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