[rules-users] Error from TroubleTicket example in official 4.0GA drools-examples-drl download

Shahad Ahmed shahad.ahmed2 at gmail.com
Tue Jul 31 12:34:42 EDT 2007


I get the following two errors reported by Eclipse when I import the
official 4.0 GA download version of the drools-examples-drl project:

1. Unable to find unambiguously defined class 'Customer', candidates are: [
org.drools.examples.Customer,
org.drools.examples.TroubleTicketExample$Customer]
drools-examples-drl/src/main/rules/org/drools/examples in TroubleTicket.drl

2. Unable to find unambiguously defined class 'Customer', candidates are: [
org.drools.examples.TroubleTicketExampleWithDSL$Customer,
org.drools.examples.Customer]
drools-examples-drl/src/main/rules/org/drools/examples in
TroubleTicketWithDSL.drl

Is this a bug in 4.0GA , or is there further configuration required after
importing the examples project? I'm using the 4.0GA release version of the
drools Eclipse plug-in.
I also noticed that I don't get this error from the latest version of drools
in the trunk (i.e. including post 4.0GA changes), so maybe this has already
been fixed since release 4.0GA?

Here's the stack when you try and run the TroubleTicketExample.java example:

Exception in thread "main" java.lang.Error: Unable to find unambiguously
defined class 'Customer', candidates are: [
org.drools.examples.TroubleTicketExample$Customer,
org.drools.examples.Customer]
 at org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java
:178)
 at org.drools.rule.builder.dialect.java.JavaFunctionBuilder.build(
JavaFunctionBuilder.java:84)
 at org.drools.rule.builder.dialect.java.JavaDialect.addFunction (
JavaDialect.java:431)
 at org.drools.compiler.PackageBuilder.addFunction(PackageBuilder.java:380)
 at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:278)
 at org.drools.compiler.PackageBuilder.addPackageFromDrl (
PackageBuilder.java:160)
 at org.drools.examples.TroubleTicketExample.main(TroubleTicketExample.java
:20)

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


More information about the rules-users mailing list