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-...
Sent from the drools - user mailing list archive at
Nabble.com.