1 Reply Latest reply on Jun 12, 2012 12:19 PM by Bira Neto

    Unable to load session snapshot in jbpm 5.3

    Bira Neto Newbie

      I've searched the posts and found a few similar problems. I decided to post this anyway for two reasons. 1. The stack trace of the cause wasn't the same. 2. This wasn't happening on version 5.2

       

      I am getting the error

           java.lang.RuntimeException: Unable to load session snapshot

      with main cause

      Caused by: java.lang.NullPointerException

           at org.drools.common.Scheduler$ActivationTimerInputMarshaller.deserialize(Scheduler.java:230)

           at org.drools.marshalling.impl.ProtobufInputMarshaller.readTimer(ProtobufInputMarshaller.java:597)

           at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:292)

           at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:161)

           at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)

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

       

      I'm currently using Postgres.

      This happens after loading a knowledge base and executing just one workflow. After that the same session can't be loaded anymore.

      Any ideas why this could be happening?

        • 1. Re: Unable to load session snapshot in jbpm 5.3
          Bira Neto Newbie

          Apparently this was caused by the way I was initializing my ksession. I was loading it with an empty KnowledgeBase and then loading the knowledge base afterwards. This worked on 5.2 but 5.3 seems to corrupt something when you initialize the ksession this way (which would go unnoticed untill you tried to load the ksession again). Also some workflows would not execute properly as it seems that workflows executed resulting from timer schedules and events would be executed in a ksession with an empty knowledge base (even if the ksession was already loaded again with a proper kbase).

          Changing my initialization code to load the stateful session for the first time with the kbase already initialized seems to have fixed the problem.