Greetings all,
I posted this to the Seam users forum and they recommended I post it here as well.
I am using Seam 2.0.0 and Drools 4.0.7. I am getting the following exception when my rule
is compiled on first access.
Rule:
package org.ebsinc.ia.rules
#list any import classes here.
import org.ebsinc.ia.entity.BenefitAnalysis;
import org.ebsinc.ia.entity.RetirementEligibility;
#declare any global variables here
rule "Verify FERS"
when
$ba : BenefitAnalysis(plan == "FERS")
$elig : RetirementEligibility(eligible == false)
then
System.out.println("FERS retirement");
$elig.setReason("ok");
end
components.xml
<drools:rule-base name="securityRules" >
<drools:rule-files>
<value>/security.drl</value>
</drools:rule-files>
</drools:rule-base>
<drools:rule-base name="retirementEligibility">
<drools:rule-files>
<value>/RetirementEligibility.drl</value>
</drools:rule-files>
</drools:rule-base>
<drools:managed-working-memory name="retirementEligibilityWM"
scope="event"
auto-create="true"
rule-base="#{retirementEligibility}" />
Exception:
2008-08-26
08:40:37,750 ERROR [STDERR] at
org.drools.rule.builder.dialect.java.JavaConsequenceBuilder.build(JavaConsequenceBuilder.java:123)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:67)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
at org.jboss.seam.drools.RuleBase.compileRuleBase(RuleBase.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:1968)
at org.jboss.seam.Component.getInstance(Component.java:1865)
at org.jboss.seam.Component.getInstance(Component.java:1832)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
at
org.jboss.seam.drools.ManagedWorkingMemory.getRuleBaseFromValueBinding(ManagedWorkingMemory.java:78)
at
org.jboss.seam.drools.ManagedWorkingMemory.getStatefulSession(ManagedWorkingMemory.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.unwrap(Component.java:2100)
at org.jboss.seam.Component.getInstance(Component.java:1879)
at org.jboss.seam.Component.getInstance(Component.java:1832)
at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2174)
at org.jboss.seam.Component.getValueToInject(Component.java:2126)
at org.jboss.seam.Component.injectAttributes(Component.java:1590)
at org.jboss.seam.Component.inject(Component.java:1408)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
at
org.ebsinc.ia.action.AgentAction_$$_javassist_2.getClientSearchKey2(AgentAction_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
... 89 more
Caused by: org.mvel.UnresolveablePropertyException: unable to resolve token:
declr.identifier
at org.mvel.ASTNode.getReducedValue(ASTNode.java:324)
at org.mvel.ast.PropertyASTNode.getReducedValue(PropertyASTNode.java:32)
at
org.mvel.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:110)
at org.mvel.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:58)
at org.mvel.TemplateInterpreter.execute(TemplateInterpreter.java:403)
Show replies by date