Hi all,
I'm using drools rule with axis2 and tomcat 6.0.13 and i get this error

org.drools.RuntimeDroolsException: Exception executing predicate eval( stereotypeID[1] == "D1" )
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
    at org.drools.reteoo.Rete.assertObject(Rete.java:175)
    at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
    at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
    at sapi.adapter.ws.AdapterManager.getAdaptedEntity(AdapterManager.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
    at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.mvel.PropertyAccessException: unable to resolve property: stereotypeID[1]
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:286)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:110)
    at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:186)
    at org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
    at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
    at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
    at org.mvel.MVEL.executeExpression(MVEL.java:235)
    at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:45)
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
    ... 37 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:459)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:264)
    ... 45 more

import sapi.adapter.ws.EntityAdapter;
import sapi.KnowledgeManager.bean.Entity;
import sapi.KnowledgeManager.bean.UserContextStereotype;


rule "all_1.1"
    salience 10
    no-loop true
    when
        $ent : Entity();
        $ucs : UserContextStereotype(
               magnifier==true &&
               stereotypeID[1]=="D1");
    then
        $ent = EntityAdapter.resize($ent,90);
       end

I don't understand why when I start this rule under eclipse it work just fine.
If I use this application as webService I get this error.
Can anyone help me?


Thanks


Posta, news, sport, oroscopo: tutto in una sola pagina
Crea l'home page che piace a te!.