An error message <br>   [Error: unable to resolve method using strict-mode: x.y.z()]<br>should not be interpreted as &quot;Drools has looked for x.y.z() <b><i>only</i></b>, and failed.&quot;<br><br>Given a DRL condition<br>
   foo == ...<br>Drools will try and locate methods getFoo(), isFoo() and foo(); and a method must meet certain requirements such as an empty argument list and a non-void result, and (I think - not sure) it must be sufficiently visible. <br>
<br>Now, what about &quot;result&quot; in  ultra.Default.ultra.MYHTTPD?<div></div><br>-W<br><br><br><div class="gmail_quote">2012/1/9 Olle Martensson <span dir="ltr">&lt;<a href="mailto:olle.martensson@digitalroute.com">olle.martensson@digitalroute.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Ignore the last post, It was a silly mistake on my part .. sorry about that.</div>
<div>It makes no difference if I use run the DTABLE without KnowledgeAgent:</div><div><br></div><div><div>Jan 9 14:08:19: Unable to Analyse Expression request == &quot;/&quot;:</div><div>Jan 9 14:08:19: [Error: unable to resolve method using strict-mode: ultra.Default.ultra.MYHTTPD.request()]</div>
<div>Jan 9 14:08:19: [Near : {... request == &quot;/&quot; ....}]</div><div>Jan 9 14:08:19:              ^</div><div>Jan 9 14:08:19: [Line: 7, Column: 10]</div></div><div><br></div><div>Drools tries to resolve the property request with a call to ultra.Default.ultra.MYHTTPD.request() when it should look for ultra.Default.ultra.MYHTTPD.getRequest().</div>
<div><br></div><div><img src="cid:C7EB7185-C8D8-4A4E-B4D3-2CFC16ED2368" type="image/png"></div><div><br></div><div><br></div><span><div style="border-style:solid none none;border-color:rgb(181,196,223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in;text-align:left;font-size:11pt;font-family:Calibri">
<span style="font-weight:bold">From: </span> olle martensson &lt;<a href="mailto:olle.martensson@digitalroute.com" target="_blank">olle.martensson@digitalroute.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span> Mon, 9 Jan 2012 13:25:10 +0100<br><span style="font-weight:bold">To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span> Re: [rules-users] xls decisiontable -&gt; unable to resolve method using strict-mode<br></div><div><br></div><div><div style="word-wrap:break-word"><div style="font-family:Calibri,sans-serif">
Thanks for your answer.</div><div style="font-family:Calibri,sans-serif"><br></div><div style="font-family:Calibri,sans-serif">I have now tried to load the XLS without the KnowledgeAgent(see <span style="font-family:Calibri">createKnowledgeBase() below)</span><span>. </span></div>
<div style="font-family:Calibri,sans-serif">This time I got class loading problems( see stack trace below).</div><div style="font-family:Calibri,sans-serif">This only happens when I load a XLS decision table, If I load a DRL rules file it runs fine without classloading issues.</div>
<div style="font-family:Calibri,sans-serif">I use a custom classloader that is configured with the <span style="font-family:Calibri">KnowledgeBaseConfiguration, I can see that drools is trying to load the rule classes from the custom classloader when I run DTABLE but not when I run DRL.</span></div>
<div style><font face="Monaco"><span style="font-family:Calibri">From the stacktrace it seems as if it&#39;s using C</span></font><span style="font-family:Calibri,sans-serif">ompositeClassLoader though.</span></div><div style>
<span style="font-family:Calibri,sans-serif"><br></span></div><div style><span style="font-family:Calibri,sans-serif">### STACKTRACE ###</span></div><div style="font-size:14px;font-family:Calibri,sans-serif"><div style="font-family:Calibri,sans-serif;font-size:14px">
<br></div><div style="font-family:Calibri,sans-serif;font-size:14px"><div style="font-family:Calibri,sans-serif;font-size:14px">java.lang.ClassNotFoundException: Unable to load classA_rules_test.Rule_print_the_incoming_query_9</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.util.CompositeClassLoader.loadClass:110</div><div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.loadClass:540</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">    at java.lang.ClassLoader.loadClass:247</div><div style="font-family:Calibri,sans-serif;font-size:14px">    at A_rules_test.Rule_print_the_incoming_query_9DefaultConsequenceInvoker.evaluate</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.common.DefaultAgenda.fireActivation:1091</div><div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.common.DefaultAgenda.fireNextItem:1029</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.common.DefaultAgenda.fireAllRules:1251</div><div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.common.AbstractWorkingMemory.fireAllRules:708</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.common.AbstractWorkingMemory.fireAllRules:672</div><div style="font-family:Calibri,sans-serif;font-size:14px">    at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules:218</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br></div><div style="font-family:Calibri,sans-serif;font-size:14px">### CREATION OF KNOWLEDGEBASE ###</div></div></div><div style="font-size:14px;font-family:Calibri,sans-serif">
<br></div><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif"><span style="color:rgb(127,42,103)">private</span> <span style="color:rgb(127,42,103)">void</span> createKnowledgeBase()</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">    {</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        KnowledgeBaseConfiguration kBaseConfig = KnowledgeBaseFactory</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
                .newKnowledgeBaseConfiguration(<span style="color:rgb(127,42,103)">null</span>, <span style="color:rgb(11,45,201)">context</span>.getClassLoader());</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        kBaseConfig.setOption(EventProcessingOption.<span style="color:rgb(11,45,201)">STREAM</span>);</p><p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal;color:rgb(102,141,115)">
<span style="color:rgb(0,0,0)">       </span>//kBaseConfig.setOption(MultithreadEvaluationOption.YES);</p><p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal;color:rgb(102,141,115)">
<span style="color:rgb(0,0,0)">       </span>//kBaseConfig.setOption(MaxThreadsOption.get(Runtime.getRuntime().availableProcessors() * 2));</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        KnowledgeBase kBase = KnowledgeBaseFactory</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
                .newKnowledgeBase(kBaseConfig);</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">
<br></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        KnowledgeBuilderConfiguration bconf = KnowledgeBuilderFactory</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">                .newKnowledgeBuilderConfiguration(<span style="color:rgb(127,42,103)">null</span>,</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">                        <span style="color:rgb(11,45,201)">context</span>.getClassLoader());</p>
<p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal;color:rgb(52,60,252)"><span style="color:rgb(0,0,0)">        bconf.setProperty(</span>&quot;drools.dialect.java.compiler&quot;<span style="color:rgb(0,0,0)">, </span>&quot;ECLIPSE&quot;<span style="color:rgb(0,0,0)">);</span></p>
<p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal;color:rgb(52,60,252)"><span style="color:rgb(0,0,0)">        bconf.setProperty(</span>&quot;drools.dialect.java.lngLevel&quot;<span style="color:rgb(0,0,0)">, </span>&quot;1.6&quot;<span style="color:rgb(0,0,0)">);</span></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">        </p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        DecisionTableConfiguration dtableconfiguration =</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        <span style="white-space:pre-wrap">                </span>KnowledgeBuilderFactory.newDecisionTableConfiguration();</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        dtableconfiguration.setInputType( DecisionTableInputType.<span style="color:rgb(11,45,201)">XLS</span> );</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">
        </p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px"><br></p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        PackageBuilderConfiguration pconf = (PackageBuilderConfiguration) bconf;</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        pconf.setClassLoaderCacheEnabled(<span style="color:rgb(127,42,103)">true</span>);</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">        </p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        MVELDialectConfiguration conf = (MVELDialectConfiguration)pconf.getDialectConfiguration(<span style="color:rgb(52,60,252)">&quot;mvel&quot;</span>);</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        conf.setStrict(<span style="color:rgb(127,42,103)">false</span>);</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">
        </p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        String compilerDumpDir = <span style="color:rgb(11,45,201)">context</span>.getCompilerDumpDir();</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        <span style="color:rgb(127,42,103)">if</span> (compilerDumpDir != <span style="color:rgb(127,42,103)">null</span> &amp;&amp; !compilerDumpDir.isEmpty())</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        {</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
            pconf.setDumpDir(<span style="color:rgb(127,42,103)">new</span> File(compilerDumpDir));</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        }</p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">        </p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kBase, bconf);</p>
<p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif;min-height:15px">        </p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal;font-size:14px;font-family:Calibri,sans-serif">
        <span style="color:rgb(52,60,252)"><span style="color:rgb(0,0,0)">kbuilder.add(ResourceFactory.newFileResource(</span></span><span style="color:rgb(52,60,252)">&quot;/tmp/templatetest.xls&quot;</span><span style="color:rgb(52,60,252)"><span style="color:rgb(0,0,0)">),</span></span></p>
<p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal">                      ResourceType.<span style="color:rgb(11,45,201)">DTABLE</span>,</p>
<p style="margin:0px;font-family:Monaco;font-style:normal;font-variant:normal;font-weight:normal;font-size:11px;line-height:normal;font-size-adjust:none;font-stretch:normal">                      dtableconfiguration);</p>
<div style="font-size:14px;font-family:Calibri,sans-serif"><span style="font-family:Monaco;font-size:11px">    }</span></div><div style="font-size:14px;font-family:Calibri,sans-serif"><span style="font-family:Monaco;font-size:11px"><br>
</span></div><div style><font face="Monaco"><br></font></div><div style="font-size:14px;font-family:Calibri,sans-serif"><br></div><span style="font-size:14px;font-family:Calibri,sans-serif"><div style="border-style:solid none none;border-color:rgb(181,196,223) -moz-use-text-color -moz-use-text-color;border-width:1pt medium medium;padding:3pt 0in 0in;text-align:left;font-size:11pt;font-family:Calibri">
<span style="font-weight:bold">From: </span> Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Date: </span> Mon, 9 Jan 2012 09:18:51 +0100<br><span style="font-weight:bold">To: </span> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span> Re: [rules-users] xls decisiontable -&gt; unable to resolve method using strict-mode<br></div><div><br></div>Have you tried load the XLS into a KnowledgeBase without using a KnowledgeAgent?<br>
<br> Trying to narrow down where the issue might be will help (everyone) tremendously.<br><br><div class="gmail_quote">On 5 January 2012 16:40, ollem <span dir="ltr">&lt;<a href="mailto:olle.martensson@digitalroute.com" target="_blank">olle.martensson@digitalroute.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204,204,204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">Hello!<br><br>
I&#39;m using a knowledgeagent to point out a changeset XML which contains the<br>
following DTABLE:<br><br>
...<br>
&lt;resource source=&#39;file:/../templatetest.xls&#39; type=&#39;DTABLE&#39; /&gt;<br>
...<br><br>
when I compile I get the following error:<br><br>
Unable to Analyse Expression request == &quot;/&quot;:<br>
[Error: unable to resolve method using strict-mode:<br>
ultra.Default.ultra.MYHTTPD.request()]<br>
[Near : {... request == &quot;/&quot; ....}]<br>
             ^<br>
[Line: 7, Column: 10] : [Rule name=&#39;print the incoming query_9&#39;]<br><br>
The weird this is that MYHTTPD class is a javabean and contains getRequest<br>
and setRequest methods.<br>
notice that it tries a no getter method<br>
ultra.Default.ultra.MYHTTPD.request().<br>
If I do the same logic from a normal DRL rules file it works fine.<br>
MYHTTPD is generated so I cannot past the source here, but it&#39;s correct and<br>
as I mentioned working in DRL files.<br><br>
this is how the XSL file looks like:<br><br>
RuleSet A rules test<br>
Import  ultra.Default.ultra.MYHTTPD<br><br>
RuleTable    print the incoming query<br>
CONDITION        ACTION<br>
MYHTTPD<br>
request  System.out.println($param);<br>
Matcher  Logger<br>
/                &quot;webserver root&quot;<br><br>
Anybody who knows what this is about?<br><br>
Thanks // Olle<br><span><font color="#888888"><br><br><br><br><br><span class="HOEnZb"><font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/xls-decisiontable-unable-to-resolve-method-using-strict-mode-tp3635460p3635460.html" target="_blank">http://drools.46999.n3.nabble.com/xls-decisiontable-unable-to-resolve-method-using-strict-mode-tp3635460p3635460.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
</font></span></font></span></blockquote></div><br></span></div></div></span></div>
<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>
<br></blockquote></div><br>