Here is my snippet of my code in 5.5.0.Final
import org.drools.KnowledgeBase;
import org.drools.agent.KnowledgeAgent;
import org.drools.agent.KnowledgeAgentFactory;
import org.drools.definition.type.FactType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatelessKnowledgeSession;
KnowledgeAgent ka = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent");
ka.applyChangeSet(
ResourceFactory.newClassPathResource("src/main/resources/ChangeSet.xml") );
KnowledgeBase kb = ka.getKnowledgeBase();
FactType factType =
kb.getFactType("org.numbercompare","NumberCompare");
Object nc = factType.newInstance();
factType.set( nc, "numberone",numberone );
factType.set( nc, "numbertwo", numbertwo );
StatelessKnowledgeSession ks = kb.newStatelessKnowledgeSession();
ks.execute(nc);
I get the following error
java.lang.RuntimeException: Provider
org.drools.agent.impl.KnowledgeAgentProviderImpl could not be set
Here are my dependencies in pom.xml
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.5.0.Final</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.5.0.Final</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>knowledge-api</artifactId>
<version>5.5.0.Final</version>
</dependency>
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-5-5-0-Runtime-Exception-java-lan...
Sent from the Drools: User forum mailing list archive at
Nabble.com.