You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Kumar Mahadevan <ku...@gmail.com> on 2012/11/03 11:05:55 UTC

error while executing drools rules using service mix

When executing drools rules I get the following error

error while compiling DRL
Unable to build expression for 'consequence': java.lang.Class cannot be cast
to org.mvel2.util.MethodStub '

whenever I try to update any variable (eg a java Map) within the DRL. I am
inserting this Map into the drools session using
ksession.insert( resolution );  // resolution is the name of the Map

eg rule "Info"
    dialect "mvel"
    when
        $map: Map(this["loglevel"] == "INFO")
    then
	 
	  $map.put("resolution",new String("IGNORE"));
	  update($map);
	  
	   
    when
       $map: Map(this["loglevel"] == "ERROR")
    then
	   
	  $map.put("resolution",new String("AUTO"));
	  update($map);
	
   			
end


THis error occurs only when I execute drools rules within the context of
servicemix. As a standalone program there are no issues.  Pls advice..



--
View this message in context: http://servicemix.396122.n5.nabble.com/error-while-executing-drools-rules-using-service-mix-tp5714825.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.