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