[rules-users] NoClassDefFoundError: BaseObjectClassFieldReader

Edson Tirelli tirelli at post.com
Fri Dec 5 18:44:37 EST 2008


   I don't think that what we do in drools *core* is wrong because drools
core itself is not tied to OSGi or any other framework. Maybe the issue here
is that we need an OSGi integration layer? something that will assemble a
composite classloader from the "buddy" policies? And of course, leverage
that into the drools-eclipse plugin so that it will also meet your plugin
dependency requirements...

   Faron, if you can contribute your code back, we could make it a
drools-osgi module?

   []s
   Edson


2008/12/5 keithnielsen <keithnielsen at discover.com>

>
> Faron,
>
> Thanks for your reply. I am looking at a combination of using the Eclipse
> buddy loading (dependent vs registered) and use of fragments (attached to
> the rules plug-in). However this is an eclipse implementation and I don't
> know all the gory details of the OSGI implementation outside that each
> bundle has its own classloader to know how I would accomplish the same
> thing
> with "pure" OSGI (i.e. no Eclipse buddies). So bottom line whatever
> solution
> I come up with for eclipse runtime might not translate nicely to an app
> server leveraging OSGI. Your solution is probably more portable to OSGI but
> I am fundamentally opposed to having to deal with classloaders at this
> level, the framework should take care of it.
>
> Edson, in answer to your question about Drools knowing about facts, "buddy"
> policies is the answer, you don't want the framework to change in anyway
> with the introduction of new facts/flows so you add your fact bundles as
> dependents of drools and set a property in the manifest of the drools
> plug-in to look at any plug-ins that declare drools plug-in as a dependent
> for iany facts required.
>
> I have worked through numerous issues and will document them, but I think
> the Drools implementation needs a second look since its forcing
> dependencies
> where their shouldn't be dependencies(vague I know, so I will back it up
> with some documentation once I have a fully functioning solution).
>
> Thanks
>
>
>
>
> 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-tp20802217p20864456.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081205/816e5581/attachment.html 


More information about the rules-users mailing list