[rules-users] Trying to get Eclipse Java code to call Guvnor

Jaroslaw Kijanowski kijanowski at gmail.com
Fri Mar 26 13:06:24 EDT 2010


Hey John,
  have you created a Drools Project in Eclipse? Then put the file in 
src/main/java
It will be copied over to the bin directory automatically and then 
picked up when running your app.

Cheers,
  Jarek

John Peterson wrote:
> I’m using the example code from the Red Hat Magazine - 
> ___http://magazine.redhat.com/2008/08/12/jboss-drools-how-to-tuning-guvnor-part-1/_ 
> - to try to get the sample code to work, but I keep getting the 
> following error:
> 
> Exception in thread "main"___ java.lang.NullPointerException_
> 
>         at java.util.Properties$LineReader.readLine(Unknown Source)
> 
>         at java.util.Properties.load0(Unknown Source)
> 
>         at java.util.Properties.load(Unknown Source)
> 
>         at 
> org.drools.agent.RuleAgent.loadFromProperties(___RuleAgent.java:299_)
> 
>         at org.drools.agent.RuleAgent.newRuleAgent(___RuleAgent.java:256_)
> 
>         at test.GuvnorTest.main(___GuvnorTest.java:15_)
> 
> It appears to be unable to find my ‘Guvnor.properties’ file, but I have 
> it in the classpath (I actually have it in several different places on 
> my C: drive as I tried to figure out why it couldn’t find it).  Does 
> anyone have any thoughts on what’s wrong here?
> 
> I’d appreciate any guidance.  It seems like this should be a simple 
> answer but I haven’t been able to figure it out.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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