plan serialization error with registerURIMapper

Bug #934136 reported by William Candillon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Invalid
Undecided
Unassigned

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.

Changed in zorba:
importance: Undecided → Critical
milestone: none → 2.2
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

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
Changed in zorba:
importance: Critical → Undecided
milestone: 2.2 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.