[rules-users] 3.1 M1 "from" keyword

Mark Proctor mproctor at codehaus.org
Mon Apr 30 11:15:05 EDT 2007


This is now corrected in MVEL 1.2beta16 which also inlines ASM with a 
different package name. The MVEL author notes that while the jar 
conflict stops the ASM optimiser, it'll still work as normal in the 
fallback reflection mode.

Mark
brad hadfield wrote:
> Sure -- here's the stack trace...
>  
>  org.objectweb.asm.ClassWriter.<init>(I)V
>  at 
> org.mvel.optimizers.impl.asm.ASMAccessorOptimizer.<init>(ASMAccessorOptimizer.java:88)
>  at 
> org.mvel.optimizers.OptimizerFactory.<clinit>(OptimizerFactory.java:46)
>  at org.mvel.Token.getReducedValueAccelerated(Token.java:302)
>  at org.mvel.ExecutableAccessor.getValue(ExecutableAccessor.java:46)
>  at org.mvel.MVEL.executeExpression(MVEL.java:173)
>  at 
> org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:43)
>  at org.drools.reteoo.FromNode.assertTuple(FromNode.java:61)
>  at 
> org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
>  at 
> org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:147)
>  at 
> org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
>  at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:163)
>  at org.drools.reteoo.Rete.assertObject(Rete.java:121)
>  at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
>  at 
> org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
>  at 
> org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:724)
>  at 
> org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:543)
>  at test.hxr.TestCompileDrl.testCompileAndExecute(TestCompileDrl.java:91)
>  at test.hxr.TestCompileDrl.main(TestCompileDrl.java:40)
> [MVEL] Notice: Possible incorrect version of ASM present (3.0 
> required).  Disabling JIT compiler.  Reflective Optimizer will be used.
> This is more of an MVEL question, I guess, but do you know if there is 
> a way to force the use of reflection over ASM?
>
> Thanks, Brad
> ------------------------------------------------------------------------
> *From:* Michael Neale [mailto:michael.neale at gmail.com]
> *Sent:* Thursday, April 26, 2007 8:11 PM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] 3.1 M1 "from" keyword
>
> should already be done - mvel may be using the wrong one.
>
> Can you tell me what class it is that gives the nosuchmethod? (ie what 
> the target class is) and we can make sure all references are to 
> inlined one so this won't happen again.
>
> Michael.
>
> On 4/27/07, *Mark Proctor* <mproctor at codehaus.org 
> <mailto:mproctor at codehaus.org>> wrote:
>
>     For M2 I'll look at changing the namespace for ASM to avoid this
>     issue. Not sure how you'll avoid the issue till then.
>
>     Mark
>     brad hadfield wrote:
>>     Hi, I wonder if anyone could help me?
>>
>>     I'm attempting to use the 'from' keyword in  the same fashion as
>>     the sample found on the Release Notes/Language Improvement wiki. 
>>     The example shows a piece of syntax that uses the 'from' keyword
>>     to obtain data via a Hibernate query. i.e:
>>      
>>       $r : Restaurant( $postCode ) from hbSession.getNamedQuery(
>>     "some query" ).setProperties( [ key1 : value2, key2 : value ]
>>     ).list()
>>
>>     I'm having difficulty executing syntax using this keyword because
>>     Hibernate uses CGlib which relies on ASM 1.5.3 - the 'from'
>>     keyword seems to rely on MVEL which uses ASM 3.0.
>>      
>>     ASM 3.0 is not backwards compatible with ASM 1.5.3 and I get 'no
>>     such method' errors.
>>      
>>     So how does one get the 'from' keyword to work in an environment
>>     running Hibernate?
>>      
>>     Thanks,
>>     Brad
>>     ------------------------------------------------------------------------
>>
>>     _______________________________________________
>>     rules-users mailing list
>>     rules-users at lists.jboss.org
>>      <mailto:rules-users at lists.jboss.org>
>>     https://lists.jboss.org/mailman/listinfo/rules-users
>>       
>
>
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070430/2b890ce2/attachment.html 


More information about the rules-users mailing list