[rules-users] MarshallerReaderContext.resolveClass() unhandled null pionter exception

KiranP phadatarekiran at gmail.com
Fri Mar 12 23:10:35 EST 2010


hi daniel,

actually the error was caused from the Class.forName where to code specified
its own class loader as
 i line :
return Class.forName(name, false, this.ruleBase.getRootClassLoader());
here actually the rulebase is null while initializing hence this is created
the error
as null pointer exception
i resolved this by using the default classLoader which can be used directly
by specifying the classLoader field in function call as null.....


java Documentation wrote:
> 
>  If the parameter loader is null, the class is loaded through the
> bootstrap class loader. The class is initialized only if the initialize
> parameter is true and if it has not been initialized earlier
> 
so to get rid of the error
i used :
return Class.forName(name, false, null);

and it is working fine.
this is wht my solution was as i didn't get any reply from Drools Team



regards
kiranP
-- 
View this message in context: http://n3.nabble.com/MarshallerReaderContext-resolveClass-unhandled-null-pionter-exception-tp215025p445113.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list