Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3145

Types declared in DRL with no fields are not included in KnowledgeBase compiled by ChangeSet

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Setting up KnowledgeBase using KnowledgeAgent which is pulling package from Guvnor. DRL declares type, which already exists in client model, with @role(event) and no fields. Get the following stack trace when inserting an object:

      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:705)
      at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:282)
      at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
      at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
      at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
      at john.DroolsError.runRules(DroolsError.java:48)
      at john.DroolsError.main(DroolsError.java:40)

      If the type is fully declared in the DRL, the NPE does not occur.

      When compiling a DRL from a Change Set, the resulting package in the Knowledge Base does not contain declare'd types that do not contain fields; it only contains declares with at least one field. This results in a ClassObjectTypeConf with a typeDecl == null.

            etirelli@redhat.com Edson Tirelli
            jfullard_jira John Fullard (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: