[rules-users] Class Cast Exception

Robert Morse rmorse at mdesignz.com
Thu Nov 1 21:30:49 EDT 2007


This has come up before, but I think my circumstances may be different.
I'm using Seam 2.0.0.CR2, Drool 4.0.3, and JBoss AS 4.2.1 along with  
all of the relevant support jars.
I have a Java Application that uses the JBoss server for entity beans,  
etc.   It uses Drools PackageBuilder, loads the drl file and fires the  
rules without any problems.

I'm now moving that same functionality to a stateful Seam bean.   When  
a user clicks on a button, I invoke an action which executes the same  
code as in the stand alone java application.   However, when it  
attempts to create a new PackageBuilder via new PackageBuilder() it  
throws:

18:05:18,610 ERROR [STDERR] org.drools.RuntimeDroolsException: Unable  
to load dialect  
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
followed by:

18:05:18,621 ERROR [STDERR] Caused by: java.lang.ClassCastException:  
org.drools.rule.builder.dialect.java.JavaDialectConfiguration
18:05:18,621 ERROR [STDERR] 	at  
org 
.drools 
.compiler 
.PackageBuilderConfiguration 
.addDialect(PackageBuilderConfiguration.java:147)

I've seen this posted several times, and the suggested cause is  
missing jars in the classpath.   However, I have all of the 4.0.3  
Drools jars, mvel14, and jdt-core jars in place.
Obviously, it's some configuration problem since I have the exact  
thing working as a java application.

Any suggestions?

Thanks.




More information about the rules-users mailing list