JBoss Community

Unable to load session snapshot

created by Francesco Pietrobelli in jBPM - View the full discussion

Hi,

i have a problem about persistence that i don't know how to resolve it. Particularly i'm not able to load a session with some facts into an entry point of working memory.

 

I have attached a very simple eclipse project in which there is only one rule file and one java class:

In the rule file i define a entry-point called "eventStream"

 

 

In java class inside a single transaction i:

  1. create a StatefulKnowledgeSession
  2. add some facts in entry point
  3. dispose session

After that in another transaction i try to load the session, but the following exception is thrown

 

java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

    at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:103)

    at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:71)

    at org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:118)

    at jpaSession.TestJPASession.loadKnowledgeSession(TestJPASession.java:148)

    at jpaSession.TestJPASession.testLoadSessionWithFactsInEntryPoint(TestJPASession.java:97)

    at jpaSession.TestJPASession.main(TestJPASession.java:65)

Caused by: java.lang.reflect.InvocationTargetException

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

    at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:88)

    ... 5 more

Caused by: java.lang.RuntimeException: Unable to load session snapshot

    at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:96)

    at org.drools.persistence.SingleSessionCommandService.initKsession(SingleSessionCommandService.java:196)

    at org.drools.persistence.SingleSessionCommandService.(LeftTuple.java:144)

    at org.drools.marshalling.impl.InputMarshaller.readLeftTuple(InputMarshaller.java:599)

    at org.drools.marshalling.impl.InputMarshaller.readFactHandles(InputMarshaller.java:372)

    at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshaller.java:220)

    at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarshaller.java:92)

    at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:91)

    ... 12 more

 

 

the problem occurs only when i dispose the session with some facts in entry-point, if i insert some facts in workingmemory everything works fine.

 

does anyone have any suggestion?

 

i'm using jBPM 5.1 CR1

Reply to this message by going to Community

Start a new discussion in jBPM at Community