Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1328

CEP KieSession deserialization NullPointerException with Timer and expiration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.0.0.Beta3
    • 7.0.0.Beta2
    • None
    • None
    • NEW
    • NEW

    Description

      When a Cep KieSession containing events with expiration is serialized and then deserialized there is a NullPointerExceptions is thrown:

      java.lang.NullPointerException
      	at org.drools.core.reteoo.ObjectTypeNode$ExpireJobContextTimerInputMarshaller.deserialize(ObjectTypeNode.java:672)
      	at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readTimer(ProtobufInputMarshaller.java:709)
      	at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:291)
      	at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:162)
      	at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:116)
      	at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:52)
      	at org.drools.compiler.integrationtests.CepEspTest$1KieSessionByteArraySerializer.readSession(CepEspTest.java:220)
      	at org.drools.compiler.integrationtests.CepEspTest.testSerializationDeserliaizationWithRectractedExpireFact(CepEspTest.java:253)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.lang.Thread.run(Thread.java:745)
      

      you have a reproducer in PR: https://github.com/droolsjbpm/drools/pull/959

      Just run:

      cd drools-compiler
      mvn clean test -Dtest=CepEspTest#testSerializationDeserliaizationWithRectractedExpireFact
      

      Attachments

        Issue Links

          Activity

            People

              mfusco@redhat.com Mario Fusco
              atarocch@redhat.com Andrea Tarocchi (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: