Hi,

I can't get drools-insurance to work with the latest Drools BRMS 4.0.7. I followed the installation instructions in the drools doc, got the drools-insurance from SVN (trunk), installed the repository in BRMS, but when I test it, i get the following error :


-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.acme.insurance.test.SupplementalInfoTest
RuleAgent(insuranceconfig) INFO (Fri Jun 06 11:37:24 CEST 2008): Configuring wit
h newInstance=true, secondsToRefresh=30
RuleAgent(insuranceconfig) INFO (Fri Jun 06 11:37:24 CEST 2008): Configuring pac
kage provider : URLScanner monitoring URLs:  http://localhost:8080/drools-jbrms/
org.drools.brms.JBRMS/package/org.acme.insurance.base/InsuranceDemo
RuleAgent(insuranceconfig) EXCEPTION (Fri Jun 06 11:37:25 CEST 2008): null. Stac
k trace should follow.
java.io.EOFException
        at java.io.DataInputStream.readInt(Unknown Source)
        at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source
)
        at java.io.ObjectInputStream.readInt(Unknown Source)
        at org.drools.common.DroolsObjectInputStream.readInt(DroolsObjectInputSt
ream.java:517)
        at org.drools.common.DroolsObjectInputStream.readStreamHeader(DroolsObje
ctInputStream.java:204)
        at org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStr
eam.java:142)
        at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:181
)
        at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:150
)
        at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:47)
        at org.drools.agent.URLScanner.readPackage(URLScanner.java:139)
        at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:111)
        at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:90)
        at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
        at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
        at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)
        at org.drools.agent.RuleAgent.init(RuleAgent.java:208)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:216)
        at org.acme.insurance.web.InsuranceSessionHelper.loadRuleBaseFromRuleAge
nt(InsuranceSessionHelper.java:26)
        at org.acme.insurance.web.InsuranceSessionHelper.getSession(InsuranceSes
sionHelper.java:17)
        at org.acme.insurance.test.SupplementalInfoTest.setUp(SupplementalInfoTe
st.java:23)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:210)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:135)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:225)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:747)
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.432 sec <<< FA
ILURE!
Running org.acme.insurance.test.DriverTest
Tests run: 8, Failures: 0, Errors: 8, Skipped: 0, Time elapsed: 0.033 sec <<< FA
ILURE!
Running org.acme.insurance.test.DriverAdditionalInfoTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.011 sec <<< FA
ILURE!
Running org.acme.insurance.test.InsuranceCalculateTest
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.016 sec <<< FA
ILURE!

Results :
Tests run: 17, Failures: 0, Errors: 17, Skipped: 0

[ERROR] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23 seconds
[INFO] Finished at: Fri Jun 06 11:37:25 CEST 2008
[INFO] Final Memory: 4M/13M
[INFO] ------------------------------------------------------------------------


The trunk version of drools insurance depends on drools 5.0.0-SNAPSHOT. If I downgrade it to 4.0.7, i get a kind of Serialization exception :

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.acme.insurance.test.SupplementalInfoTest
RuleAgent(insuranceconfig) INFO (Fri Jun 06 11:51:56 CEST 2008): Configuring wit
h newInstance=true, secondsToRefresh=30
RuleAgent(insuranceconfig) INFO (Fri Jun 06 11:51:56 CEST 2008): Configuring pac
kage provider : URLScanner monitoring URLs:  http://localhost:8080/drools-jbrms/
org.drools.brms.JBRMS/package/org.acme.insurance.base/InsuranceDemo
RuleAgent(insuranceconfig) EXCEPTION (Fri Jun 06 11:51:57 CEST 2008): org.drools
.rule.VariableRestriction$VariableContextEntry; local class incompatible: stream
 classdesc serialVersionUID = 4315261080934628448, local class serialVersionUID
= -2458845645553055486. Stack trace should follow.
java.io.InvalidClassException: org.drools.rule.VariableRestriction$VariableConte
xtEntry; local class incompatible: stream classdesc serialVersionUID = 431526108
0934628448, local class serialVersionUID = -2458845645553055486
        at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
        at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
        at java.io.ObjectInputStream.readClassDesc(Unknown Source)
        at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
        at java.io.ObjectInputStream.readClassDesc(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.util.ArrayList.readObject(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readArray(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.util.HashMap.readObject(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
        at java.io.ObjectInputStream.readSerialData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.drools.rule.PackageCompilationData.readExternal(PackageCompilatio
nData.java:149)
        at java.io.ObjectInputStream.readExternalData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.drools.rule.Package.readExternal(Package.java:176)
        at java.io.ObjectInputStream.readExternalData(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:59)
        at org.drools.agent.URLScanner.readPackage(URLScanner.java:138)
        at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:110)
        at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88)
        at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
        at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
        at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)
        at org.drools.agent.RuleAgent.init(RuleAgent.java:208)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148)
        at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:216)
        at org.acme.insurance.web.InsuranceSessionHelper.loadRuleBaseFromRuleAge
nt(InsuranceSessionHelper.java:26)
        at org.acme.insurance.web.InsuranceSessionHelper.getSession(InsuranceSes
sionHelper.java:17)
        at org.acme.insurance.test.SupplementalInfoTest.setUp(SupplementalInfoTe
st.java:23)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.jav
a:210)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:135)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:225)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.j
ava:747)

Has anyone succeeded in testing drools-insurance with BRMS 4.0.7?

Thanks

Regards,

Fred