[jboss-jira] [JBoss JIRA] (JBRULES-3243) NullPointerException ReteooFactHandleFactory.java:56 when using Event from another package

Richard Ambridge (Updated) (JIRA) jira-events at lists.jboss.org
Wed Oct 12 09:43:16 EDT 2011


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

Richard Ambridge updated JBRULES-3243:
--------------------------------------

           Description: 
If an item is declared @role (event) and the package name for that item is not the same as the package name of the rules, a Null pointer is thrown.




  was:
If an item is declared @role (event) and the package name for that item is not the same as the package name of the rules, a Null pointer is thrown.


    Steps to Reproduce: 
Attached are some junit files
Execute to receive:
java.lang.NullPointerException
        at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
        at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:80)
        at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:65)
        at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:720)
        at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:280)
        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882)
        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:841)
        at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)


Note, this only happens when PackageBuilder is used, the test will build one rule into a package
and then load that package, create a stateful session and inject an object that is an Event
If you move the Item.java into PackageA, this works.
If you compile the rule inline using KnowledgeBuilder, this works.
If the @role is removed, this works.

  was:
Attached are some junit files
Execute to receive:
java.lang.NullPointerException
        at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
        at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:80)
        at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:65)
        at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:720)
        at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:280)
        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882)
        at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:841)
        at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)


    
> NullPointerException ReteooFactHandleFactory.java:56 when using Event from another package
> ------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3243
>                 URL: https://issues.jboss.org/browse/JBRULES-3243
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.3.0.CR1
>         Environment: Ubuntu, JDK 2.6.0.26
>            Reporter: Richard Ambridge
>            Assignee: Mark Proctor
>         Attachments: files.tar
>
>
> If an item is declared @role (event) and the package name for that item is not the same as the package name of the rules, a Null pointer is thrown.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list