[rules-dev] Guvnor in hosted mode

Michael Neale michael.neale at gmail.com
Mon Oct 12 18:34:47 EDT 2009


You are close - yes I think it uses GWT1.5.3 on trunk at least (5.1
m1). the ant script we generally only use for building it.

For running hosted mode, I am trying to remember for eclipse.

But you need the source checked out, and all the modules loaded into eclipse.
But before that, do:

mvn -Dmaven.test.skip install

at the top level of the project to set up deps. You can then to mvn
eclipse:eclipse to set up the eclipse project files - and *then*
import it all into eclipse.

You can then go into drools-guvnor and run:

mvn -Dmaven.test.skip clean package

that will put the deps in the lib directory of the WEB-INF.

Open eclipse, make sure the M2_REPO directory is set, and also the
GWT_HOME and GWT_DEV environment variables in eclipse point to the GWT
1.5.3 install directory, and the gwt-dev-linux.jar (or whatever
platform) respectively (the launch configuration refers to those
environment variables).

Then open eclipse, refresh the project, and then choose Run
configurations from the menu, find the Guvnor launch config, and then
make sure that its dependencies are the jars from the WEB-INF/lib that
were put there in the previous step (as hosted mode will need them).
you can use either jar versions of modules, or just check the boxes
for the dependent projects (either should work).
Its a bit cumbersome, the GWT plug in for eclipse might work, I
haven't tried it. IntelliJ IDEA automates all these steps (but it is
doing the same thing).
You can then run OR debug hosted mode and step through it.

On Tue, Oct 13, 2009 at 8:55 AM, Mulcahy, Lawrence
<larry.mulcahy at qwest.com> wrote:
> I right-clicked on the drools-guvnor project, scrolled down to PyDev, and
> selected
>
> ‘Set as PyDev project’.  That seems to fix the ‘no python nature’ error.
> I’m
>
> scratching my head a little as if there’s any Python here it’s not obvious.
>
>
>
> Next error is
>
>
>
> The project: drools-repository, which is referenced by the classpath, does
> not exist.
>
>
>
> I tried importing that into Eclipse.  Now it wants drools-templates,
>
> drools-decisiontables.  I import them.
>
>
>
> Now it says
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/gwt/dev/GWTShell
>
>
>
> Hmm, does it just need this in my project build path?
>
>
>
> I take a minute to set up my GWT_DEV classpath correctly.  No, that
>
> didn’t fix it.  gwt-dev-linux.jar is in fact the home of the GWTShell class.
>
> This JAR file is not present in the project Java Build Path Libraries
>
> (all the M2_REPO entries are there but nothing referring to
>
> GWT_HOME or GWT_DEV) so I try adding it.
>
>
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /home/lmulcahy/java/gwt-linux-1.5.2/libswt-pi-gtk-3235.so:
> /home/lmulcahy/java/gwt-linux-1.5.2/libswt-pi-gtk-3235.so: wrong ELF class:
> ELFCLASS32 (Possible cause: architecture word width mismatch)
>
> I go in Run Configurations and select a 32 bit JRE instead of the default 64
> bit.
>
>
>
> Yay!  It comes up.
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Mulcahy, Lawrence
> Sent: Monday, October 12, 2009 2:51 PM
>
> To: 'Rules Dev List'
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> My search for a file mentioning mvel2-2.0.9-SNAPSHOT.jar failed because of
>
> a typo in the search string.  It’s in drools-guvnor/Guvnor.launch.
>
>
>
> I replaced mvel2-2.0.9-SNAPSHOT.jar with mvel2-2.0.10.jar in Guvnor.launch.
>
>
>
> Run -> Run.  Hmm.  ‘No python nature for project: drools-guvnor’
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Mulcahy, Lawrence
> Sent: Monday, October 12, 2009 12:51 PM
> To: 'Rules Dev List'
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> I tried what’s documented at the wiki page, in Eclipse, Run -> Run, choose
>
> Guvnor (the other choice was Guvnor.mac).  It gave me this error:
>
>
>
> The archive:
> /drools-guvnor/target/drools-guvnor/WEB-INF/lib/mvel2-2.0.9-SNAPSHOT.jar
> which is referenced by the classpath, does not exist.
>
>
>
> Looking in the source tree, I found this instead:
>
>
>
> drools-guvnor/target/drools-guvnor/WEB-INF/lib/mvel2-2.0.10.jar
>
>
>
> (I’m working with drools-5.0-src.zip downloaded from
>
> http://www.jboss.org/drools/downloads.html)
>
>
>
> Can anyone tell me where this is configured?  File search in
>
> Eclipse didn’t turn it up.
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Mulcahy, Lawrence
> Sent: Monday, October 12, 2009 11:06 AM
> To: 'Rules Dev List'
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> OK, there is some documentation at
>
> http://www.jboss.org/community/wiki/RulesRepositoryBuildInstructions
>
> that seems to touch on this… I need to configure the location of GWT
>
> in build.properties, and apparently the version that was used is
>
> 1.5.2 (that’s what’s in my build.properties now).
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Mulcahy, Lawrence
> Sent: Monday, October 12, 2009 10:53 AM
> To: 'Rules Dev List'
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> The Ant target gwt-shell in drools-guvnor/build.xml sounded promising,
>
> but when I tried to run it, it got this error
>
>
>
> Could not load definitions from resource de/samaflost/gwttasks/antlib.xml.
> It could not be found.
>
>
>
> That is coming from this taskdef:
>
>
>
>             <taskdef uri="antlib:de.samaflost.gwttasks"
>
>                           resource="de/samaflost/gwttasks/antlib.xml"
>
>                           classpath="../lib/gwttasks.jar"/>
>
>
>
> Relative to drools-guvnor, there is no ../lib.
>
>
>
> I searched for gwttasks.jar in the Drools source and in the
>
> GWT (1.7.1) distribution but didn’t find it.
>
>
>
> Jboss.org is having another bad web day.  There’s probably something
>
> about this in the wiki or documentation but it’s all inaccessible right now.
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Mulcahy, Lawrence
> Sent: Monday, October 12, 2009 8:47 AM
> To: 'Rules Dev List'
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> Thanks Michael.  How can I do this?  Or is it documented somewhere?
>
> If there’s a ‘how to work with the Drools code’ document somewhere
>
> that would be really cool.  We are thinking about doing a custom rule
>
> editor for an internal application.
>
>
>
> ________________________________
>
> From: rules-dev-bounces at lists.jboss.org
> [mailto:rules-dev-bounces at lists.jboss.org] On Behalf Of Michael Neale
> Sent: Saturday, October 10, 2009 5:17 AM
> To: Rules Dev List
> Cc: rules-dev at lists.jboss.org
> Subject: Re: [rules-dev] Guvnor in hosted mode
>
>
>
> It is the right list - and yes it can. All development happens in gwt hosted
> mode.
>
>
>
> I put in some special code to let it work with hosted mode tomcat etc for
> quick turnaround.
>
>
>
> If you use eclipse, you need to keep the launch config deps up to date -
> with idea it is automatic.
>
> Sent from my phone.
>
> On 10/10/2009, at 6:12 AM, "Mulcahy, Lawrence" <larry.mulcahy at qwest.com>
> wrote:
>
> Hope this is the right list for this question… A typical GWT application
>
> can be brought up in ‘hosted’ mode for development with the command
>
>
>
> ant hosted
>
>
>
> Is there a way to do this for Drools Guvnor?
>
>
>
> Thanks,
>
> Larry
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>



-- 
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com



More information about the rules-dev mailing list