This is not a bug. It's misusing the API. If the URI mappers are used
with the plan serializer, a SerializationCallback has to be registered
which allows the plan serializer to retrieve the exact same mappers that
were registered before.

** Changed in: zorba
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/934136

Title:
  plan serialization error with registerURIMapper

Status in Zorba - The XQuery Processor:
  Invalid

Bug description:
  The following program:
       {   
         StaticContext_t lSctx = aZorba->createStaticContext();
         OneToOneURIMapper lStopWordsMapper(EntityData::STOP_WORDS);
         lSctx->registerURIMapper(&lStopWordsMapper);
         XQuery_t lQuery = aZorba->compileQuery(lIn, lSctx);
         lQuery->saveExecutionPlan(lOut, ZORBA_USE_BINARY_ARCHIVE, 
SAVE_UNUSED_FUNCTIONS);
       }   

       {   
         std::istringstream lIn(lOut.str());
         XQuery_t lQuery = aZorba->createQuery();
         lQuery->loadExecutionPlan(lIn);
         std::cout << lQuery << std::endl;
       }  

  Returns:
  Zorba serialization error [zerr:ZCSE0013]: failed to load pre-compiled query: 
document, collection, or module resolver required but no SerializationCallback 
given

  By commenting " lSctx->registerURIMapper(&lStopWordsMapper);" this
  program works fine.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/934136/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to