I've forgot to attach the error message. I'm sorry.

org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
    at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
    at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
    at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
    at org.drools.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1065)
    at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:701)
    at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:678)
    at org.drools.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:195)
    at org.drools.myexample.KnowledgeBaseManager.activate(KnowledgeBaseManager.java:75)
    at org.drools.myexample.Main.main(Main.java:51)
Caused by: java.lang.NullPointerException
    at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:346)
    at org.drools.rule.VariableRestriction.isAllowedCachedLeft(VariableRestriction.java:109)
    at org.drools.rule.VariableConstraint.isAllowedCachedLeft(VariableConstraint.java:106)
    at org.drools.common.TripleBetaConstraints.isAllowedCachedLeft(TripleBetaConstraints.java:205)
    at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:114)
    at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
    at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:78)
    at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
    at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
    at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
    at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
    at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
    at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:114)
    at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:108)
    at org.drools.myexample.rules.Rule_Insert_Watcher_Into_Knowledge_Base_0.consequence(Rule_Insert_Watcher_Into_Knowledge_Base_0.java:16)
    at org.drools.myexample.rules.Rule_Insert_Watcher_Into_Knowledge_Base_0ConsequenceInvoker.evaluate(Rule_Insert_Watcher_Into_Knowledge_Base_0ConsequenceInvoker.java:18)
    at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934)
    ... 7 more
13.08.2010 00:26:47 org.apache.activemq.ActiveMQMessageConsumer dispatch
Exception while processing message: java.lang.NullPointerException
java.lang.NullPointerException
    at org.drools.base.extractors.BaseObjectClassFieldReader.getLongValue(BaseObjectClassFieldReader.java:136)
    at org.drools.base.ClassFieldReader.getLongValue(ClassFieldReader.java:171)
    at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:323)
    at org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:116)
    at org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:112)
    at org.drools.common.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:216)
    at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:172)
    at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
    at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
    at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
    at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788)
    at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:216)
    at org.drools.myexample.KnowledgeBaseManager.addEvent(KnowledgeBaseManager.java:55)
    at org.drools.myexample.Main.insertEvent(Main.java:65)
    at org.drools.myexample.jms.PublisherListener.onMessage(PublisherListener.java:40)
    at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1204)
    at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
    at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
    at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
    at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


Am 12.08.2010 22:00, schrieb Mauricio Salatino:
can you explain what isn't working? can you share the error with us??
where are you doing the insert?in the RHS?

On Thu, Aug 12, 2010 at 4:56 PM, Tina Vießmann <tviessmann@stud.hs-bremen.de> wrote:
Hi again ...

I would like to insert a new generated object into the knowledge base.
It seems that
    insert (new Watcher())
 is working. But
    Watcher watcher = new Watcher();
    insert (watcher);
 isn't working?

Why?

Thank you for any explanations. :)

Tina
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users