[rules-users] Eclipse Question - Newbie

J Michael Dean mdean77 at comcast.net
Sun May 27 12:26:26 EDT 2007


I have an RCP application that uses Jess and have added code to  
switch to JBoss.  I can create a sample rules project in Eclipse, but  
when I simply move the rules and the Java source from the JBoss rules  
project into my RCP, I get extensive errors.  I have added the JBoss  
builder and the JBoss dependencies to the build path.  I get  
extensive errors when I merely try to open, edit, or save the drl  
file, but I tried to run the code anyway.  I guess basic question is  
how to add JBoss rules to an existing RCP project.

When the code is executed, it obviously opens the rules because the  
errors that I get indicate it has opened it.  Here is the exception  
trace.

org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType  
'Message' : [Rule name=Hello World, agendaGroup=MAIN, salience=0, no- 
loop=false]
Unable to resolve ObjectType 'Message' : [Rule name=GoodBye,  
agendaGroup=MAIN, salience=0, no-loop=true]
Rule Compilation error : [Rule name=GoodBye, agendaGroup=MAIN,  
salience=0, no-loop=true]
	sample/rules/Rule_GoodBye_0.java (2:29) : Only a type can be  
imported. com.sample.DroolsTest.Message resolves to a package
	sample/rules/Rule_GoodBye_0.java (7:267) : message cannot be resolved
	sample/rules/Rule_GoodBye_0.java (8:282) : m cannot be resolved
	sample/rules/Rule_GoodBye_0.java (8:296) : message cannot be resolved
Rule Compilation error : [Rule name=Hello World, agendaGroup=MAIN,  
salience=0, no-loop=false]
	sample/rules/Rule_Hello_World_0.java (2:29) : Only a type can be  
imported. com.sample.DroolsTest.Message resolves to a package
	sample/rules/Rule_Hello_World_0.java (7:271) : message cannot be  
resolved
	sample/rules/Rule_Hello_World_0.java (8:286) : m cannot be resolved
	sample/rules/Rule_Hello_World_0.java (9:328) : m cannot be resolved
	sample/rules/Rule_Hello_World_0.java (9:341) : Message.GOODBYE  
cannot be resolved to a type
	sample/rules/Rule_Hello_World_0.java (10:383) : m__Handle__ cannot  
be resolved
	sample/rules/Rule_Hello_World_0.java (10:396) : m cannot be resolved

	at org.drools.rule.Package.checkValidity(Package.java:368)
	at org.drools.common.AbstractRuleBase.addPackage 
(AbstractRuleBase.java:250)
	at sample.rules.DroolsTest.readRule(DroolsTest.java:64)
	at sample.rules.DroolsTest.main(DroolsTest.java:21)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070527/ae1fbacf/attachment.html 


More information about the rules-users mailing list