Hi, 

Whenever I use classes from any third party jar files (not in JRE System Library and Drools Library), I got error messages in Eclipse IDE. At the place where I import the class, the error message is "Only a type can be imported. ... resolves to a package". At the place where I use the class, the error message is "... cannot be resolved to a type". 

However, I have included the jar file in classpath. The project can be executed successfully in Eclipse even with the error message in IDE. 


To make the problem easier to describe and to reproduce if anybody interested, I use the example reported at https://issues.jboss.org/browse/DROOLS-373. Both my problem and this are about external libraries, so I feel they may have some connections. 

Below are my steps:

1. Download drools6scratch-kiemavenclasspath.zip from jira and unzip the file
2. In eclipse, Import -> Existing Maven Projects, and select the unzipped folder
3. After import, convert the project to Drools Project

Then I get errors in both package.drl and AppTest.java. The attached screenshots can give more details. 

This happens to every imported class from third party libraries. But the classes from JRE System Libraries or Drools Libraries are fine. 

So I have to disable drools builder, which also turns off drools validation in eclipse. It is very inconvenient for my development work. 

I believe many people are using eclipse for drools development, but I am surprise nobody complains about it on Internet. First I suspect its configuration problem on my side, but I tried with fresh installation on both MacOS and windows 7, and I always get the same problem. 

Below is my environment:
  • OS: Mac OS X 10.9.2 and Windows 7
  • Eclipse Kepler (Standard and for Java EE Developer) 
  • Drool Eclipse Plugin - JBoss Drools Core 6.0.1Final. 
  • Java SE 1.7
  • Drools Runtime 6.0.1

Thank you so much if anybody can help.

Jinghai