[rules-users] help

Jaroslaw Kijanowski kijanowski at gmail.com
Fri Jun 19 11:12:30 EDT 2009


Can you try *the same versions* of the plugin+runtime and Guvnor. GA 
should work.

SHIMI Abdelouahad ( Prestataire ) wrote:
> I was deploy Guvnor(drools-5.0.0.CR1-guvnor) as an exploded archive on
> the JBoss Application Server(version jboss-4.2.3.GA).
> And I was 
> *	Create categories, ok
> *	Create package,ok
> *	Importe model, ok
> *	Create rule, ok
> 
> And create a simple Drools application(with Eclipse version 3.4 and
> pluging drools 5.0) that will use a package served by Guvnor:
> public class GuvnorTest {
> 
>         public static final void main(String[] args) {
> 
>                 RuleAgent agent =
> RuleAgent.newRuleAgent("/Guvnor.properties");
>                 RuleBase ruleBase = agent.getRuleBase();
> 
>                 WorkingMemory workingMemory =
> ruleBase.newStatefulSession();
> 
>                 Driver d = new Driver("Jarek", 20, null);
>                 workingMemory.insert(d);
> 
>                 workingMemory.fireAllRules();
> 
>                 for (Iterator i = workingMemory.iterateObjects();
> i.hasNext();) {
>  
> System.out.println(i.next().getClass().getCanonicalName());
>                 }
>         }
> 
> }
> 
> The properties file:
> url=http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package
> /myNewPackage/LATEST
> 
> And When the application is run I have this Exception:
> 
> RuleAgent(default) EXCEPTION (Thu Jun 18 10:46:40 CEST 2009): null.
> Stack trace should follow.
> java.io.OptionalDataException
> 	at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1310)
> 	at
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
> 	at
> org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
> 	at
> org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
> 	at
> org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:50)
> 	at org.drools.agent.URLScanner.readPackage(URLScanner.java:148)
> 	at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:120)
> 	at
> org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
> 	at
> org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
> 	at
> org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
> 	at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
> 	at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
> 	at kijanowski.eu.GuvnorTest.main(GuvnorTest.java:13)
> Exception in thread "main" java.lang.NullPointerException
> 	at
> org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:363)
> 	at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
> 	at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
> 	at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256)
> 	at kijanowski.eu.GuvnorTest.main(GuvnorTest.java:13)
> 
> I am realy stuck in the middle please please please please please  help.
> 
> 
> 
> 
> 
> This e-mail and/or attachment(s) is (are) confidential and may be legally
> protected. This message is addressed to the intended recipient only. If you
> are not the intended recipient of the message, please notify the sender
> immediately. Its contents do not constitute a commitment by the sender's
> company except where provided for in a written and signed agreement between
> you and sender's company. Any disclosure, use or dissemination, either in
> whole or in partial, shall be prior authorized by the sender's company by
> written and signed agreement. E-mail and/or attachment(s) cannot be guaranteed
> to be secured or error-free as information can be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or contain viruses. The sender.s
> company has taken all reasonable precautions to ensure that any attachment to
> this message does not contain a virus. However, the sender.s company (and not
> any of its Officers, Directors, Employees or Agents) cannot be held liable for
> any damages resulting from or linked to the existence of a virus. You are
> therefore strongly advised to carry out all your own anti-virus checks before
> opening any and all attachments to this message.
> 
> 
> _______________________________________________
> 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