Hi 
I am writing a drools based app. I am getting this error when I create an instance of KnowledgeBuilder 

at line, 

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); 


Here is the error. Can anyone tell what does this error mean ? 

java.lang.NullPointerException: Parent ClassLoader may not be null 
   at java.lang.ClassLoader.<init>(ClassLoader.java:239) 
   at java.lang.ClassLoader.<init>(ClassLoader.java:226) 
   at org.drools.util.CompositeClassLoader.<init>(CompositeClassLoader.java:38) 
   at org.drools.util.ClassLoaderUtil.getClassLoader(ClassLoaderUtil.java:27) 
   at org.drools.compiler.PackageBuilderConfiguration.setClassLoader(PackageBuilderConfiguration.java:333) 
   at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:165) 
   at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:159) 
   at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:210) 
   at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:143) 
   at Org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryS 
   at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:47) 
   at com.ts.DBconnector.readKnowledgeBase(DBconnector.java:125) 

 

I also tried adding this

 

            Thread.currentThread().setContextClassLoader( this.getClass().getClassLoader() );

 

But am still getting the same error … please help !

 

-abhay


This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.