<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örg</p>
<p>sent from a mobile device </p>
<div class="gmail_quote">On Apr 4, 2012 12:55 PM, "Mark Proctor"
<<a moz-do-not-send="true"
href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>>
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>
> Hi folks,<br>
> In the process of upgrading from Java 1.6 to Java 1.7
(1.7.0_03 to be<br>
> precise) we updated Drools from 5.1.1 to 5.3.1 (as in
5.1.1 language level<br>
> 1.7 is not supported).<br>
><br>
> However with Drools 5.3.1 the system property
"drools.dialect.mvel.strict"<br>
> seems not to be applied all the time. I know this sounds
fishy, but this is<br>
> 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>
><br>
> In a (junit based) test we create the knowledgebase by
loading multiple drl<br>
> files. Each of them has the dialect 'mvel' set in its
beginning.<br>
> In our @BeforeClass of the test we do a:<br>
> System.setProperty("drools.dialect.mvel.strict",
"false");<br>
><br>
> and I also tried using a KnowledgeBuilderConfiguration
with the appropriate<br>
> settings.<br>
> But still sometimes the test fails with a "unable to
resolve method using<br>
> strict-mode..." message. I say sometime because running
the test multiple<br>
> times via maven "mvn -Dtest=ClassicDroolsTest test"
sometimes produces<br>
> failure, sometimes produces success.<br>
> It might by noteworthy that the method called in the test
expects two<br>
> parameters of type Double, but as it seems Drools is not
seeing the<br>
> covariant return type of the class which is actually used
(the abstract base<br>
> method has return type Object, the concrete method has
return type Double).<br>
><br>
> I tried to reproduce the issue with a simpler test setup
to be able to post<br>
> it here but did not succeed.<br>
><br>
> I also applied the patch<br>
> <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>
> (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>
> 5.1.1 sources, compiled them myself and everything works
like a charm with<br>
> it. However I cannot use this unofficial work around as I
can't (and don't<br>
> want) use a patched version of Drools in my environment.<br>
> Also when I compile& run my sources with jdk
1.6.0_31 everything is fine.<br>
><br>
> I'd really appreciate any help on this topic as I
couldn't find any hints on<br>
> this behaviour in the release notes from Drools
versions> 5.1.1<br>
><br>
> Thanks<br>
><br>
> Joerg<br>
><br>
> --<br>
> 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>
> Sent from the Drools: User forum mailing list archive at
Nabble.com.<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>
<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>