Hi Fernando,
Removing the compiled package will help, but the problem that myself and the
other users have encountered also occurs with the RuleAgent url due to the
incorrect version of mvel (see the first part of my earlier post in this
thread). I suspect you will also need to update the mvel jar in the lib
directory in
mvel14-1.2pre5.jar to mvel14-1.2rc1.jar.
My main concern is that this problem is in the official 4.0 GA download
option "Drools 4.0.0 Examples", and consequently a lot of new users may have
problems getting the BRMS examples to work. As the examples are often the
first thing new users try, then it would be good to fix this and make the
fix available on the Drools download page, as well updating the trunk.
Regards
Shahad
On 7/30/07, Fernando Meyer <fmcamargo(a)gmail.com> wrote:
Hi Shahad,
You are right, the binary in resources directory is deprecated, But as you
can see I'm using the RuleAgent url to access deployed stuff (
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/drool...),
I think for compatibility issues will be better remove the compiled package
in resources dir.
Thanks for your feedback
Fernando Meyer
http://fmeyer.org
fmcamargo(a)gmail.com
PGP: 0xD804DDFB
On Jul 30, 2007, at 1:26 PM, Shahad Ahmed wrote:
I had the same problem but managed to fix it.
I think the problem is that the repository in the BRMS insurance example
was built with an old version of the MVEL library (mvel14-1.2pre5.jar)
which means that some the MVEL objects defined in the example repository (in
file repository_export.xml) have an incorrect serialVersionUID values when
they are accessed by the BRMS web-app, which uses a (newer?) version of MVEL
mvel14-1.2rc1.jar.
Here's how I got the example working:
1. I assume you've already loaded the example repository from
repository_export.xml as described in Fernando's instructions for the BRMS
example in the drools 4.0GA manual (section 9, which incidentally doesn't
have a table of contents entry, so you have to scroll down to near the end
of the manual). Click the Packages option on the left-hand side of the BRMS
page. Select the org.acme.insurance package in the Explore tab. Click on
"build, validate and deploy" for this package. Then click the "Build
Package" button. This will build a new version of the example, but using the
new MVEL library. If the build worked, another button will appear below the
"Build Package" button called "create Snapshot for Deployment".
Created a
new snapshot and call it what you like.
2. Click the Deployment option on the left-hand-side of the BRMS window.
Click on the Snapshot tab and then select the org.acme.insurance package.
The new snapshot you created should be listed. Click the Open button beside
it and copy the displayed Package URI into the
brmsdeployedrules.properties file to replace the existing key called url –
this is identical to the instructions in the manual. Save the file.
3. In the example eclipse project, remove the mvel14-1.2pre5.jar from the
project's java build path libraries. Add in the following jars from the
drools 4.0 GA binary distribution:
mvel14-1.2rc1.jar
drools-core-4.0.0.jar
drools-compiler-4.0.0.jar
Now run MainClass in the examples eclipse project. Hopefully, you will see
the expected output.
Note that the exported binary version of the insurance example found in
resources/org.acme.insurance.pkg suffers from the same issue. To get that
working as well you will need to create a new version of the file by
selecting "download binary package" in step 1, after clicking "Build
Package".
Also note that you get the same problem if you use the "BRMS Drools 4.0.0BRMS
Standalone" version that comes with Tomcat
5.5 on the download page. To fix that, find the folder
drools-jbrms-1.0-standalone\shared\lib and then replace
mvel14-1.0-SNAPSHOT.jar with the version of MVEL in the 4.0 GA binary dist
- mvel14-1.2rc1.jar.
Hope this helps.
Shahad
On 7/20/07, davidnm <davidnm(a)gmail.com> wrote:
>
>
> I did it and i got the same, i forgot to say i´m running it on Tomcat
> 5.5
> could it be the problem?
>
> Thanks.
>
>
>
> Fernando Meyer Camargo wrote:
> >
> > use double \ in your config. file
> >
> > ex. D:\\workspace2\\drools-example-brms\\cache
> >
> >
> >
> > Fernando Meyer
http://fmeyer.org
> > fmcamargo(a)gmail.com
> > PGP: 0xD804DDFB
> >
> >
> >
> > On Jul 19, 2007, at 9:31 AM, David Nogueras wrote:
> >
> >> Hi, I´m trying to run the brms sample and i get the next output:
> >>
> >> RuleAgent(insuranceconfig) INFO (Thu Jul 19 14:27:44 CEST 2007):
> >> Configuring with newInstance=true, secondsToRefresh=30
> >> RuleAgent(insuranceconfig) INFO (Thu Jul 19 14:27:44 CEST 2007):
> >> Configuring package provider : URLScanner monitoring URLs: http://
> >> localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/
> >> org.acme.insurance/David2 with local cache dir of D:\workspace2
> >> \drools-example-brms\cache
> >> RuleAgent(insuranceconfig) WARNING (Thu Jul 19 14:27:44 CEST 2007):
> >> Falling back to local cache.
> >> java.lang.NullPointerException
> >> at org.drools.agent.FileScanner.readPackage(FileScanner.java:101)
> >> at org.drools.agent.FileScanner.getChangeSet (FileScanner.java
> :79)
> >> at org.drools.agent.FileScanner.loadPackageChanges
> >> ( FileScanner.java:57)
> >> at org.drools.agent.URLScanner.loadPackageChanges
> >> (URLScanner.java:93)
> >> at org.drools.agent.RuleAgent.checkForChanges (RuleAgent.java
> :291)
> >> at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:259)
> >> at org.drools.agent.RuleAgent.configure(RuleAgent.java:228)
> >> at org.drools.agent.RuleAgent.init(RuleAgent.java:160)
> >> at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:169)
> >> at org.acme.insurance.launcher.InsuranceBusiness.loadRuleBase
> >> (InsuranceBusiness.java:26)
> >> at org.acme.insurance.launcher.InsuranceBusiness.executeExample
> >> (InsuranceBusiness.java:14)
> >> at org.acme.insurance.launcher.MainClass.main(MainClass.java:13)
> >>
> >> could someone help me?
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users(a)lists.jboss.org
> >>
https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users(a)lists.jboss.org
> >
https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/drools-example-brms-tf4110522.html#a11702935
>
> Sent from the drools - user mailing list archive at
Nabble.com<http://nabble.com/>
> .
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users