[rules-users] Eclipse plug-in and peculiar problem with import statements

Beck, Eivind eivind.beck at capgemini.com
Fri Oct 17 08:54:10 EDT 2008


I’m experiencing a peculiar problem with import statements using the Drools Eclipse plug-in.

When importing domain objects from a specific package, the editor gives an error for all rule statements within the rule file, saying that the import can not be resolved.
The classes that give this problem have the fully qualified class name pattern: no.vps.dom.fund.*.*    -  example: no.vps.dom.fund.fund.SalesPerson
The error message in the Eclipse editor says: “The import no.vps.dom.fund cannot be resolved.

The problem is definitely not errors in the package names, as using the fully qualified class names within the rules works just fine. Also – using the import statements works fine within the rule engine, even if the Eclipse editor gives compilation errors.

I’ve tried to do some changes to the package name, and changing a single character in any of the first four element of the fully qualified class name solves the problem – example: so.vps.dom.fund.fund.SalesPerson works fine.

Unfortunately, we’re not allowed to change the package names for the domain objects – so that not an option. I’ve tried to figure out if there is some kind of conflict between the package name and the list of reserved Drools keywords, but I’m not able to see that  “no.vps.dom.fund” can possibly match any of the keywords.

Currently the only options I see are:

1)       Ignoring the editors errors. This is extremely annoying as it seems like we have a lot of problems, and it is easy to overlook actual problems in-between all the “red dots”….

2)       Using fully qualified class names within the rules for the domain objects within no.vps.dom.fund.* - which is also a bit cumbersome and annoying

If anybody has some suggestions to workarounds, or something that can be “tweaked within the Eclipse plug-in”  this will be much appreciated.


For the reference we’re using:
- Eclipse version 3.3.1.1
- Drools 4.0.7-eclipse-3.3
- Java Runtime Environment 1.6.0_07
- Windows XP Professional

- eivind -

________________________________
Capgemini is a trading name used by the Capgemini Group of companies which includes Capgemini Norge AS, a company registered in Norway (number 943574537) whose registered office is at Hoffsveien 1 D - Pb. 475, Skøyen – 0214 Oslo.






This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081017/baccd00d/attachment.html 


More information about the rules-users mailing list