<br> What do you mean by "facts in other plugins"?<br><br> If your facts are loaded by a different classloader hierarchy, you need to set the facts classloader in:<br><br>PackageBuilderConfiguration.setClassLoader(); // to compile the rules<br>
RulebaseConfiguration.setClassLoader(); // to create the rulebase and run it<br><br> []s<br> Edson<br><br><div class="gmail_quote">2008/12/2 keithnielsen <span dir="ltr"><<a href="mailto:keithnielsen@discover.com">keithnielsen@discover.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Further testing shows that while the rules engine can locate facts from other<br>
plug-ins (facts located in the same plugin as the rules engine work fine,<br>
but not realistic to expect that all facts will be co-located in the same<br>
plugin), an attempt to reconstitute them using the ByteArrayClassloader will<br>
not work. Has anyone been successful using facts located in other plug-ins?<br>
I am using Drools 5.M2 with Eclipse 3.4.<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
keithnielsen wrote:<br>
><br>
> I have the following rule:<br>
><br>
> rule "Retrieve CID Presentation Model"<br>
> ruleflow-group "RetrieveCID"<br>
><br>
> when<br>
><br>
> CIDPresentationModel($cidValue:cidValue,$cidExpirationDate:expirationDate)<br>
> then<br>
> boolean cidResult =<br>
> cidService.verifyCIDIsValid($cidValue,$cidExpirationDate);<br>
> CIDResult result = new CIDResult(cidResult);<br>
> insert(result);<br>
> System.out.println("Executing: Retrieve CID Presentation Model");<br>
> end<br>
><br>
> Deep in the bowels of drools there is a call to<br>
> ClassFieldAccessorFactory.getClassFieldReader where it attempts to create<br>
> a class using the byte array classloader, i.e. final Class<?> newClass =<br>
> byteArrayClassLoader.defineClass(className, bytes,PROTECTION_DOMAIN). Its<br>
> at this point that a NoClassDefFoundError on the<br>
> BaseObjectClassFieldReader. From what I understand of NoClassDefFoundError<br>
> it can result when there are two sources of the same class in the<br>
> classpath or if there is some reference from the class resulting in the<br>
> error to another class that can not be resolved. It only appears in<br>
> situations where there is fields involved. It doesnt seem to matter how<br>
> simple the object is, the minute I try to use field assignment it throws<br>
> an error.<br>
><br>
> The rules engine is running as an Eclipse plug-in.<br>
><br>
<br>
--<br>
</div></div>View this message in context: <a href="http://www.nabble.com/NoClassDefFoundError%3A-BaseObjectClassFieldReader-tp20802217p20806634.html" target="_blank">http://www.nabble.com/NoClassDefFoundError%3A-BaseObjectClassFieldReader-tp20802217p20806634.html</a><br>
<div><div></div><div class="Wj3C7c">Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>