[rules-users] NoClassDefFoundError: BaseObjectClassFieldReader

keithnielsen keithnielsen at discover.com
Tue Dec 2 19:00:27 EST 2008


It appears that the field assignment issues happen when the class is in a
different plugin. If the class is in the same plugin as the rules engine it
works fine, but the minute you try and use a class from a different plugin
it chokes. 



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




More information about the rules-users mailing list