<br>&nbsp;&nbsp; What do you mean by &quot;facts in other plugins&quot;?<br><br>&nbsp;&nbsp; If your facts are loaded by a different classloader hierarchy, you need to set the facts classloader in:<br><br>PackageBuilderConfiguration.setClassLoader();&nbsp; // to compile the rules<br>
RulebaseConfiguration.setClassLoader(); // to create the rulebase and run it<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/12/2 keithnielsen <span dir="ltr">&lt;<a href="mailto:keithnielsen@discover.com">keithnielsen@discover.com</a>&gt;</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>
&gt;<br>
&gt; I have the following rule:<br>
&gt;<br>
&gt; rule &quot;Retrieve CID Presentation Model&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; ruleflow-group &quot;RetrieveCID&quot;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; when<br>
&gt;<br>
&gt; CIDPresentationModel($cidValue:cidValue,$cidExpirationDate:expirationDate)<br>
&gt; &nbsp; &nbsp; &nbsp; then<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boolean cidResult =<br>
&gt; cidService.verifyCIDIsValid($cidValue,$cidExpirationDate);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CIDResult result = new CIDResult(cidResult);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insert(result);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;Executing: Retrieve CID Presentation Model&quot;);<br>
&gt; end<br>
&gt;<br>
&gt; Deep in the bowels of drools there is a call to<br>
&gt; ClassFieldAccessorFactory.getClassFieldReader where it attempts to create<br>
&gt; a class using the byte array classloader, i.e. final Class&lt;?&gt; newClass =<br>
&gt; byteArrayClassLoader.defineClass(className, bytes,PROTECTION_DOMAIN). Its<br>
&gt; at this point that a NoClassDefFoundError on the<br>
&gt; BaseObjectClassFieldReader. From what I understand of NoClassDefFoundError<br>
&gt; it can result when there are two sources of the same class in the<br>
&gt; classpath or if there is some reference from the class resulting in the<br>
&gt; error to another class that can not be resolved. It only appears in<br>
&gt; situations where there is fields involved. It doesnt seem to matter how<br>
&gt; simple the object is, the minute I try to use field assignment it throws<br>
&gt; an error.<br>
&gt;<br>
&gt; The rules engine is running as an Eclipse plug-in.<br>
&gt;<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> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>