<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 04/04/2012 12:32, <a class="moz-txt-link-abbreviated"
      href="mailto:muenchen@korgen.de">muenchen@korgen.de</a> wrote:
    <blockquote
cite="mid:CALhnpdQ6MHRUrvVcjJMs6EDgnfKAeHOoNrVqGHTUKtnD=Z+Mxg@mail.gmail.com"
      type="cite">
      <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>
    </blockquote>
    You had two questions. The question you ahve about JDK1.7 are
    already answered in the JIRA. I'm talking about strict mode. If you
    use the eval(....) CE like that, it shoud obey the static mvel
    strict setting. If it does not, it's a bug, please file a jira with
    a self contained unit test See "getting involved" for how to submit
    unit tests:<br>
    <a class="moz-txt-link-freetext"
href="https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/droolsjbpm-introduction-docs/target/docbook/publish/en-US/html_single/index.html#gettingstarted">https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/droolsjbpm-introduction-docs/target/docbook/publish/en-US/html_single/index.html#gettingstarted</a><br>
    <br>
    Mark<br>
    <blockquote
cite="mid:CALhnpdQ6MHRUrvVcjJMs6EDgnfKAeHOoNrVqGHTUKtnD=Z+Mxg@mail.gmail.com"
      type="cite">
      <p>Best</p>
      <p>J&ouml;rg</p>
      <p>sent from a mobile device </p>
      <div class="gmail_quote">On Apr 4, 2012 12:55 PM, "Mark Proctor"
        &lt;<a moz-do-not-send="true"
          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
          "drools.dialect.mvel.strict"<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'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'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 'mvel' set in its
          beginning.<br>
          &gt; In our @BeforeClass of the test we do a:<br>
          &gt; System.setProperty("drools.dialect.mvel.strict",
          "false");<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 "unable to
          resolve method using<br>
          &gt; strict-mode..." message. I say sometime because running
          the test multiple<br>
          &gt; times via maven "mvn -Dtest=ClassicDroolsTest test"
          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 moz-do-not-send="true"
href="https://github.com/droolsjbpm/drools/commit/1c20018abeef8bee86f896ffff7945404cebb18f"
            target="_blank">https://github.com/droolsjbpm/drools/commit/1c20018abeef8bee86f896ffff7945404cebb18f</a><br>
          &gt; (comming from <a moz-do-not-send="true"
            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't (and don't<br>
          &gt; want) use a patched version of Drools in my environment.<br>
          &gt; Also when I compile&amp; &nbsp;run my sources with jdk
          1.6.0_31 everything is fine.<br>
          &gt;<br>
          &gt; I'd really appreciate any help on this topic as I
          couldn't find any hints on<br>
          &gt; this behaviour in the release notes from Drools
          versions&gt; &nbsp;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 moz-do-not-send="true"
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 moz-do-not-send="true"
            href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
          &gt; <a moz-do-not-send="true"
            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 moz-do-not-send="true"
            href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/rules-users"
            target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>