[rules-users] Using JDK dynamic proxies as facts

Edson Tirelli tirelli at post.com
Thu Jul 12 16:10:14 EDT 2007


   Chris,

   It seems like a bug to me. May I ask you please to open a JIRA and attach
your project?
   We are trying to fix final bugs for MR4 and keeping all of them in JIRA
will avoid us to miss anyone...

   Thanks

   []s
   Edson


2007/7/12, Chris West <crayzfishr at gmail.com>:
>
> Hello,
>
> I'm trying to use objects that are generated as dynamic proxies (through
> the java.lang.reflect.Proxy class) as facts in JBoss Rules 4.0 MR3.  My
> project was using CGLib to generate proxies, and they were working just fine
> in 3.0.6.  However, when I tried 4.0, the CGLib based proxies seemed to
> have a final method that kept the proxies from being proxied as shadow
> facts.  So I rewrote my code to try to use JDK based proxies, and version
> 4.0 MR3 accepts them and apparently creates shadow facts, but now my rules
> don't fire correctly.
>
> So, in an attempt to create a simple program to illustrate the problem, I
> ran into a different problem.  The attached eclipse project illustrates this
> problem.
>
> The error is:
>
> java.lang.NullPointerException
>     at org.drools.reteoo.Rete$ObjectTypeConf.<init>(Rete.java:333)
>     at org.drools.reteoo.Rete.assertObject(Rete.java:152)
>     at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java
> :190)
>     at org.drools.reteoo.ReteooWorkingMemory.doInsert(
> ReteooWorkingMemory.java:70)
>     at org.drools.common.AbstractWorkingMemory.insert(
> AbstractWorkingMemory.java:772)
>     at org.drools.common.AbstractWorkingMemory.insert (
> AbstractWorkingMemory.java:584)
>     at com.sample.DroolsTest.main(DroolsTest.java:42)
>
> Has anyone successfully used JDK based dynamic proxies as facts?
>
> Thanks,
> -Chris West
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070712/705e6154/attachment.html 


More information about the rules-users mailing list