M Arnold [
http://community.jboss.org/people/marnold] created the discussion
"NPE Loading Knowledge Base from URL"
To view the discussion, visit:
http://community.jboss.org/message/645516#645516
--------------------------------------------------------------
Hi,
I'm using Drools and Guvnor 5.3.1. When I try to load my knowledge base from Guvnor
like this:
{code}
KnowledgeAgentConfiguration kaconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
kaconf.setProperty("drools.agent.scanDirectories",
"false");
kaconf.setProperty("drools.agent.scanResources",
"false");
KnowledgeAgent ka =
KnowledgeAgentFactory.newKnowledgeAgent("agent", kaconf);
URL url = new URL(urlString);
UrlResource urlResource = (UrlResource)ResourceFactory.newUrlResource(url);
ka.applyChangeSet(urlResource);
kbase = ka.getKnowledgeBase();
{code}
I get this exception:
{code}
java.lang.NullPointerException
at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:148)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1016)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:785)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:657)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:169)
[snip]
{code}
I've tried 'Rebuilding all snapshot binaries'. Has my repository become
corrupted?
Also, can I build my knowledge base directly from Guvnor's JCR implementation, rather
than over HTTP? I'm not interested in listening / scanning for changes to the
underlying packages. I just want to load my rules and processes from Guvnor.
Apologies if this is not the correct forum. I couldn't find a discussion forum for
Drools.
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/645516#645516]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]