[jboss-user] [JBoss Seam] - Re: Problem injecting drools WorkingMemory

sjmenden do-not-reply at jboss.com
Thu Dec 7 17:19:56 EST 2006


I made some progress but now getting massive exceptions.  I changed the components.xml to look like the drools example one:

components.xml

  | ...
  | <component name="ruleBase" class="org.jboss.seam.drools.RuleBase">
  |         <property name="ruleFiles">purchasingRules.drl</property>
  |     </component>
  | 
  |     <component name="purchasingRulesMemory" class="org.jboss.seam.drools.ManagedWorkingMemory">
  |         <property name="ruleBase">#{ruleBase}</property>
  |     </component>
  | ...
  | 


But now I'm getting a ClassCastException, and I have verified my jars exactly(crosses fingers) mirror the ones in the example.  I'm running SEAM CR2 with JBoss 4.0.5


  | 17:16:25,918 ERROR [STDERR] StringTemplate: problem parsing group <unknown>: java.lang.ClassCastException: antlr.CommonToken cannot be cast to antlr.Token
  | 17:16:25,919 ERROR [STDERR] java.lang.ClassCastException: antlr.CommonToken cannot be cast to antlr.Token
  | 17:16:25,919 ERROR [STDERR]     at antlr.CharScanner.makeToken(CharScanner.java:173)
  | 17:16:25,920 ERROR [STDERR]     at org.antlr.stringtemplate.language.GroupLexer.mID(GroupLexer.java:333)
  | 17:16:25,920 ERROR [STDERR]     at org.antlr.stringtemplate.language.GroupLexer.nextToken(GroupLexer.java:103)
  | 17:16:25,920 ERROR [STDERR]     at antlr.TokenBuffer.fill(TokenBuffer.java:69)
  | 17:16:25,920 ERROR [STDERR]     at antlr.TokenBuffer.LA(TokenBuffer.java:80)
  | 17:16:25,920 ERROR [STDERR]     at antlr.LLkParser.LA(LLkParser.java:52)
  | 17:16:25,920 ERROR [STDERR]     at antlr.Parser.match(Parser.java:210)
  | 17:16:25,921 ERROR [STDERR]     at org.antlr.stringtemplate.language.GroupParser.group(GroupParser.java:117)
  | 17:16:25,921 ERROR [STDERR]     at org.antlr.stringtemplate.StringTemplateGroup.parseGroup(StringTemplateGroup.java:754)
  | 17:16:25,921 ERROR [STDERR]     at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:264)
  | 17:16:25,921 ERROR [STDERR]     at org.antlr.stringtemplate.StringTemplateGroup.<init>(StringTemplateGroup.java:244)
  | 17:16:25,921 ERROR [STDERR]     at org.drools.semantics.java.RuleBuilder.<clinit>(Unknown Source)
  | 17:16:25,921 ERROR [STDERR]     at org.drools.compiler.PackageBuilder.addRule(Unknown Source)
  | 17:16:25,922 ERROR [STDERR]     at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)
  | 17:16:25,922 ERROR [STDERR]     at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:52)
  | 17:16:25,922 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 17:16:25,922 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 17:16:25,922 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 17:16:25,922 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
  | 17:16:25,923 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | ...
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992101#3992101

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992101



More information about the jboss-user mailing list