Hi, I've fixed this bug in the trunk few days ago:
https://jira.jboss.org/browse/BRMS-320
<
https://jira.jboss.org/browse/BRMS-320>The bug is still open because I
don't have enough permissions in jira yet. ;)
Please try it out and let me know the results.
Best,
2010/6/4 ShanzRules <shanthakumar.peddada(a)patni.com>
Hi All, I am just trying to call the package created in the Guvnor
using
sample java class by loading from the properties. As below : public static
final void main(String[] args) { System.out.println("Mainnnnnnnnnn");
Properties properties = new Properties(); try { properties.load(new
FileInputStream("Guvnor.properties")); } catch (IOException e) { } RuleAgent
agent = RuleAgent.newRuleAgent(properties); RuleBase ruleBase =
agent.getRuleBase(); WorkingMemory workingMemory =
ruleBase.newStatefulSession(); GuvnorModel gm=new GuvnorModel();
gm.setAge(22); workingMemory.insert(gm); workingMemory.fireAllRules(); for
(Iterator i = workingMemory.iterateObjects(); i.hasNext();) {
System.out.println(i.next().getClass().getCanonicalName()); } } // and got
the following error : RuleAgent(default) EXCEPTION (Sun Apr 04 15:38:12 EDT
2010): org.drools.rule.DialectRuntimeRegistry; local class incompatible:
stream classdesc serialVersionUID = 5308493362083281112, local class
serialVersionUID = 2297533903900118816. Stack trace should follow.
java.io.InvalidClassException: org.drools.rule.DialectRuntimeRegistry; local
class incompatible: stream classdesc serialVersionUID = 5308493362083281112,
local class serialVersionUID = 2297533903900118816 at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562) at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583) at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732) at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at
org.drools.rule.Package.readExternal(Package.java:198) at
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792) at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751) at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
at
org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:50) at
org.drools.agent.URLScanner.readPackage(URLScanner.java:148) at
org.drools.agent.URLScanner.getChangeSet(URLScanner.java:120) at
org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96) at
org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410) at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362) at
org.drools.agent.RuleAgent.configure(RuleAgent.java:347) at
org.drools.agent.RuleAgent.init(RuleAgent.java:247) at
org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187) at
org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147) at
com.sample.DroolsTest.main(DroolsTest.java:33) Exception in thread "main"
java.lang.NullPointerException at
org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:363) at
org.drools.agent.RuleAgent.configure(RuleAgent.java:347) at
org.drools.agent.RuleAgent.init(RuleAgent.java:247) at
org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187) at
org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147) at
com.sample.DroolsTest.main(DroolsTest.java:33) -------- Could anyone pls.
let me know the solution for the above issue . Regards, Shantha
------------------------------
View this message in context: Re: RuleAgent in
webservice<http://drools-java-rules-engine.46999.n3.nabble.com/RuleAge...
Sent from the Drools - User mailing list
archive<http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Use...
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti