[jboss-jira] [JBoss JIRA] Updated: (JBRULES-3209) ReloadSessionTest fails when trying to unmarshall FactHandle

Marco Rietveld (JIRA) jira-events at lists.jboss.org
Wed Sep 14 23:07:27 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Rietveld updated JBRULES-3209:
------------------------------------

    Description: 
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}

  was:
The org.drools.persistence.session.ReloadSessionTest fails at the moment. 

I'm seeing a npe 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}

The cause of this seems to be that when InputMarshaller.readFactHandles(MarshallerReaderContext) runs in this test, the sinkId retrieved from the stream is _6_, but should be 2. The context contains an ObjectTypeNode with id 2, but not 6, in other words (and id 2 maps correctly).

When I change the value (during debugging) to 2, the test completes successfully. 



> ReloadSessionTest fails when trying to unmarshall FactHandle
> ------------------------------------------------------------
>
>                 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
>            Reporter: Marco Rietveld
>            Assignee: Marco Rietveld
>
> 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 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