[jboss-jira] [JBoss JIRA] Updated: (JBRULES-3209) ReloadSessionTest fails when trying to unmarshall the session
Marco Rietveld (JIRA)
jira-events at lists.jboss.org
Thu Sep 15 09:01:28 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Rietveld updated JBRULES-3209:
------------------------------------
Comment: was deleted
(was: I'm leaving Friday (tomorrow), so I'm assigning it to Mark, who will be able to fix it far more quickly than I can. )
> ReloadSessionTest fails when trying to unmarshall the session
> -------------------------------------------------------------
>
> Key: JBRULES-3209
> URL: https://issues.jboss.org/browse/JBRULES-3209
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.3.0.CR1
> Reporter: Marco Rietveld
> Assignee: Marco Rietveld
> Priority: Minor
>
> Unmarshalling a marshalled session fails when a fact has been inserted into the session.
> This can be seen in the org.drools.persistence.session.ReloadSessionTest, which fails at the moment.
> An npe is thrown here:
> {code}
> ConcurrentNodeMemories.getNodeMemory(NodeMemory) line: 65
> ReteooStatefulSession(AbstractWorkingMemory).getNodeMemory(NodeMemory) line: 1040
> InputMarshaller.readFactHandles(MarshallerReaderContext) line: 373
> InputMarshaller.readSession(MarshallerReaderContext, int, ExecutorService, Environment, SessionConfiguration) line: 255
> DefaultMarshaller.unmarshall(InputStream, KnowledgeSessionConfiguration, Environment) line: 92
> SessionMarshallingHelper.loadSnapshot(byte[], StatefulKnowledgeSession) line: 91
> SingleSessionCommandService.initKsession(Integer, KnowledgeBase, KnowledgeSessionConfiguration) line: 221
> {code}
> This _only_ happens when the knowledge base is reinitialized before reloading the statefulKnowledgeSession:
> {code}
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add( ResourceFactory.newByteArrayResource(rule.getBytes()), ResourceType.DRL);
> if (kbuilder.hasErrors()) {
> fail(kbuilder.getErrors().toString());
> }
> KnowledgeBase newkbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
> StatefulKnowledgeSession newCommandKSession
> = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionInfoId, newkbase, null, env);
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list