<p>Hi Mark,<br>
Thanks for your reply, but the row in the drl the error occurs on is in an eval.what do you mean by explicit?<br>
anyway this does not explain why it runs on jdk1.6 but not on 1.7.</p>
<p>Best</p>
<p>Jörg</p>
<p>sent from a mobile device </p>
<div class="gmail_quote">On Apr 4, 2012 12:55 PM, &quot;Mark Proctor&quot; &lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 04/04/2012 11:04, korgen wrote:<br>
&gt; Hi folks,<br>
&gt; In the process of upgrading from Java 1.6 to Java 1.7 (1.7.0_03 to be<br>
&gt; precise) we updated Drools from 5.1.1 to 5.3.1 (as in 5.1.1 language level<br>
&gt; 1.7 is not supported).<br>
&gt;<br>
&gt; However with Drools 5.3.1 the system property &quot;drools.dialect.mvel.strict&quot;<br>
&gt; seems not to be applied all the time. I know this sounds fishy, but this is<br>
&gt; the behaviour:<br>
MVEL strictness is only applied to explicite eval, consequence, return<br>
values and accumulates.<br>
<br>
It&#39;s not applied to field constaints. We foudn some points, around<br>
collections, where type safeness for constraints is not enforced and<br>
have strengthened that. You can still get type unsafe execution, by<br>
using the typesfalse(false), for the specific pattern. We don&#39;t like to<br>
encourage lack of type safety, as it creates difficult to maintain<br>
systems and will not benefit from performance enhancements we do on<br>
bytecode generation.<br>
<br>
Mark<br>
&gt;<br>
&gt; In a (junit based) test we create the knowledgebase by loading multiple drl<br>
&gt; files. Each of them has the dialect &#39;mvel&#39; set in its beginning.<br>
&gt; In our @BeforeClass of the test we do a:<br>
&gt; System.setProperty(&quot;drools.dialect.mvel.strict&quot;, &quot;false&quot;);<br>
&gt;<br>
&gt; and I also tried using a KnowledgeBuilderConfiguration with the appropriate<br>
&gt; settings.<br>
&gt; But still sometimes the test fails with a &quot;unable to resolve method using<br>
&gt; strict-mode...&quot; message. I say sometime because running the test multiple<br>
&gt; times via maven &quot;mvn -Dtest=ClassicDroolsTest test&quot; sometimes produces<br>
&gt; failure, sometimes produces success.<br>
&gt; It might by noteworthy that the method called in the test expects two<br>
&gt; parameters of type Double, but as it seems Drools is not seeing the<br>
&gt; covariant return type of the class which is actually used (the abstract base<br>
&gt; method has return type Object, the concrete method has return type Double).<br>
&gt;<br>
&gt; I tried to reproduce the issue with a simpler test setup to be able to post<br>
&gt; it here but did not succeed.<br>
&gt;<br>
&gt; I also applied the patch<br>
&gt; <a href="https://github.com/droolsjbpm/drools/commit/1c20018abeef8bee86f896ffff7945404cebb18f" target="_blank">https://github.com/droolsjbpm/drools/commit/1c20018abeef8bee86f896ffff7945404cebb18f</a><br>
&gt; (comming from <a href="https://issues.jboss.org/browse/JBRULES-3163" target="_blank">https://issues.jboss.org/browse/JBRULES-3163</a>) to the Drools<br>
&gt; 5.1.1 sources, compiled them myself and everything works like a charm with<br>
&gt; it. However I cannot use this unofficial work around as I can&#39;t (and don&#39;t<br>
&gt; want) use a patched version of Drools in my environment.<br>
&gt; Also when I compile&amp;  run my sources with jdk 1.6.0_31 everything is fine.<br>
&gt;<br>
&gt; I&#39;d really appreciate any help on this topic as I couldn&#39;t find any hints on<br>
&gt; this behaviour in the release notes from Drools versions&gt;  5.1.1<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Joerg<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools.46999.n3.nabble.com/mvel-strict-mode-not-applied-in-drools-5-3-1-Final-tp3883669p3883669.html" target="_blank">http://drools.46999.n3.nabble.com/mvel-strict-mode-not-applied-in-drools-5-3-1-Final-tp3883669p3883669.html</a><br>

&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div>