[rules-users] Hooray! Re: Drools library - updating Drools jar

Pegram, Macon zmpegram at choosehmc.com
Thu Aug 20 13:39:07 EDT 2009


I'm glad you found a solution that works for you.

Yes.. The Eclipse Editor gets unhappy when you do the switch.  You need
to use the Preferences menu to indicate that you've made a change to the
Drools Runtime, and as I suggested you will likely need to stop/restart
Eclipse.

I was able to follow the procedure I suggested earlier today and saw the
new MVEL in the Drools Library list.

Macon


-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of KDR
Sent: Thursday, August 20, 2009 1:16 PM
To: rules-users at lists.jboss.org
Subject: [rules-users] Hooray! Re: Drools library - updating Drools jar


Thanks Macon and Edson. Macon I did try the swapping out in the Drools
runtime folder (i.e. removing the 2.0.10 jars and adding in the
2.0.14_snapshot), but then Eclipse completely died (errors even with the
existing rules, because they no longer were able to resolve types). I
figure
that was because the plugin was still looking for 2.0.10 and wasn't
happy
that only 2.0.14_snapshot was on offer.

This is what I did before trying a new runtime folder:
- Downloaded 2.0.14_snapshot and saved it into my current Drools runtime
folder (both top level and lib for luck)
- Added 2.0.14_snapshot as an external JAR to my project's Java build
path
in Eclipse - it was at the top (as in the pic in one of my previous
posts).
- Didn't work (even on restarting Eclipse) so I guess it didn't use
2.0.14_snapshot even tho' it was at the top of the build path list.
Again,
because I think the plugin was looking for 2.0.10.

Then I did this, which worked! - I know it was probably a bit naughty of
me
because I really ought to be editing the POM and rebuilding it all as
Edson
suggested, but a workaround is a workaround...
- Closed Eclipse.
- Renamed the 2.0.10 to something else in top level and lib subfolders
of
the Drools Runtime folder
- Renamed 2.0.14_snapshot to the 2.0.10 name in both folders
- Restarted Eclipse
- It works! To be precise, because the bug I was trying to get the fix
for
was described in another thread, it is now accepts -
        m: Map( this[$str] == 1 ) 
without any "org.drools.RuntimeDroolsException: Exception executing
predicate this[$str] == 1" - and the rule even runs as expected.

I'm waiting till tomorrow before really celebrating, just in case, but I
think that did it. If it reverts back to the old problem, I will try
your
brand new runtime folder suggestion then, Macon.

Thanks again for everyone's help.



Edson Tirelli-3 wrote:
> 
>    Cool, living and learning! Thanks,
> 
>    Edson
> 
> 2009/8/20 Pegram, Macon <zmpegram at choosehmc.com>
> 
>>  There's another way.....
>>
>>
>>
>> In the Eclipse Plugin Preferences (Eclipse -> Preferences -> Drools
->
>> Installed Drools Runtime) you point to the location of the Drools
runtime
>> you want to use.  If you swap out the MVEL file at the location of
your
>> Drools Runtime it should pick up the right version of the MVEL.
>>
>>
>>
>> You could also duplicate the jar files in that folder into a "Patch"
>> folder, replace the MVEL jar in the PATCH copy, and setup a "Patch
Drools
>> Runtime" if you want to keep your original installation pristine.
>>
>>
>>
>> You will likely need/want to bounce Eclipse for this to take effect.
>>
> 

-- 
View this message in context:
http://www.nabble.com/Drools-library---updating-Drools-jar-tp25057905p25
066246.html
Sent from the drools - user mailing list archive at Nabble.com.


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list