Hi,
I am also getting same error when trying to a call rule stored in guvnor.
Following error I am getting:
Exception in thread "main" java.lang.ClassCastException:
[Lorg.drools.rule.Package; cannot be cast to org.drools.rule.Package
at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:82)
at org.drools.agent.URLScanner.readPackage(URLScanner.java:171)
at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:143)
at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:119)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:427)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:379)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:364)
at org.drools.agent.RuleAgent.init(RuleAgent.java:264)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:204)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:164)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:273)
I am using Drools 5.4 version.
The error is coming when trying to get the RuleAgent:
RuleAgent agent = RuleAgent.newRuleAgent("/com/model/drools.properties");
drools.properties contains:
url =
http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/FeltKnapRes...
name=guvnorAgent
enableBasicAuthentication=True
username=admin
password=admin
FeltKnapRestriktionerKundeMedAnl is the package name I have created in
guvnor ,and I want to call one of the rule in this package.
Thanks,
Manasi
--
View this message in context:
http://drools.46999.n3.nabble.com/java-lang-ClassCastException-Lorg-drool...
Sent from the Drools: User forum mailing list archive at
Nabble.com.