Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-3099

[GSS] (6.4.z) NullPointerException in BaseClassFieldReader.writeExternal() when a global method is used in LHS and serialize package

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 6.4.9.GA
    • Fix Version/s: 6.4.10
    • Component/s: BRE
    • Labels:

      Description

      Platform JIRA for DROOLS-2517

      Under the conditions:

      • A rule uses a method of global variable in LHS. e.g. Person(myUtil.transform(name) == "John-san")
      • A package is serialized
        Serializing the package throws NullPointerException.
        java.lang.NullPointerException: null
        	at org.drools.core.base.BaseClassFieldReader.writeExternal(BaseClassFieldReader.java:196)
        	at org.drools.core.base.extractors.MVELObjectClassFieldReader.writeExternal(MVELObjectClassFieldReader.java:72)
        	at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at org.drools.core.base.ClassFieldAccessorStore$FieldLookupEntry.writeExternal(ClassFieldAccessorStore.java:384)
        	at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1413)
        	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:497)
        	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
        	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at org.drools.core.base.ClassFieldAccessorStore.writeExternal(ClassFieldAccessorStore.java:61)
        	at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at org.drools.core.definitions.impl.KnowledgePackageImpl.writeExternal(KnowledgePackageImpl.java:250)
        	at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at java.util.ArrayList.writeObject(ArrayList.java:762)
        	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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028)
        	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
        	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
        	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
        	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
        	at org.drools.compiler.integrationtests.SerializedPackageMergeTest.testBuildAndSerializePackagesWithGlobalMethodInLHS(SerializedPackageMergeTest.java:244)
        

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  elguardian Enrique González Martínez
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                  Tester:
                  Tibor Zimanyi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: