I am using drools 3.1 MI
I have got a class Message which contains an inner class ProcessRuleDTO
When I try to assert the inner class object directly into memory it gives a
shadow fact error.
The Code Snippet :
ProcessRuleDTO processRuleDTO=message.new ProcessRuleDTO();
workingMemory.assertObject( processRuleDTO );
Error :
org.drools.RuntimeDroolsException: Error creating shadow fact for object:
com..components.Message$ProcessRuleDTO@75e4fc
at org.drools.base.ClassObjectType.getShadow(ClassObjectType.java:125)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:148)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:724)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:543)
at Example.HelloWorldExample.main(HelloWorldExample.java:57)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.drools.base.ClassObjectType.getShadow(ClassObjectType.java:123)
... 7 more
Caused by: java.lang.NoSuchMethodError:
com.components.Message$ProcessRuleDTO: method <init>()V not found
at com.components.Message$ProcessRuleDTOShadowProxy.<init>(Unknown Source)
... 12 more
Can we or not assert an inner class directly in drools?
Thanks
--
View this message in context:
http://www.nabble.com/Error-creating-shadow-fact-for-object-tf3400224.htm...
Sent from the drools - user mailing list archive at
Nabble.com.