<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; ">Thanks for your answer.</div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; "><br></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; "><span class="Apple-style-span">I have now tried to load the XLS without the KnowledgeAgent(see&nbsp;</span><span class="Apple-style-span" style="font-family: Calibri; ">createKnowledgeBase() below)</span><span class="Apple-style-span">.&nbsp;</span></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; ">This time I got class loading problems( see stack trace below).</div><div style="color: rgb(0, 0, 0); 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="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; ">I use a custom classloader that is configured with the&nbsp;<span class="Apple-style-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="color: rgb(0, 0, 0); "><font class="Apple-style-span" face="Monaco"><span style="font-family: Calibri; ">From the stacktrace it seems as if it's using C</span></font><span class="Apple-style-span" style="font-family: Calibri, sans-serif; ">ompositeClassLoader though.</span></div><div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: Calibri, sans-serif; "><br></span></div><div style="color: rgb(0, 0, 0); "><span class="Apple-style-span" style="font-family: Calibri, sans-serif; ">### STACKTRACE ###</span></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><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; ">&nbsp; &nbsp; at org.drools.util.CompositeClassLoader.loadClass:110</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.rule.JavaDialectRuntimeData$PackageClassLoader.loadClass:540</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at java.lang.ClassLoader.loadClass:247</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at A_rules_test.Rule_print_the_incoming_query_9DefaultConsequenceInvoker.evaluate</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.common.DefaultAgenda.fireActivation:1091</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.common.DefaultAgenda.fireNextItem:1029</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.common.DefaultAgenda.fireAllRules:1251</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.fireAllRules:708</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; at org.drools.common.AbstractWorkingMemory.fireAllRules:672</div><div style="font-family: Calibri, sans-serif; font-size: 14px; ">&nbsp; &nbsp; 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="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span style="color: #7f2a67">private</span> <span style="color: #7f2a67">void</span> createKnowledgeBase()</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; {</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBaseConfiguration kBaseConfig = KnowledgeBaseFactory</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .newKnowledgeBaseConfiguration(<span style="color: #7f2a67">null</span>, <span style="color: #0b2dc9">context</span>.getClassLoader());</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; kBaseConfig.setOption(EventProcessingOption.<span style="color: #0b2dc9">STREAM</span>);</p>
<p style="font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(102, 141, 115); "><span style="color: #000000">&nbsp;&nbsp; &nbsp; &nbsp; </span>//kBaseConfig.setOption(MultithreadEvaluationOption.YES);</p>
<p style="font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(102, 141, 115); "><span style="color: #000000">&nbsp;&nbsp; &nbsp; &nbsp; </span>//kBaseConfig.setOption(MaxThreadsOption.get(Runtime.getRuntime().availableProcessors() * 2));</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBase kBase = KnowledgeBaseFactory</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .newKnowledgeBase(kBaseConfig);</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBuilderConfiguration bconf = KnowledgeBuilderFactory</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .newKnowledgeBuilderConfiguration(<span style="color: #7f2a67">null</span>,</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0b2dc9">context</span>.getClassLoader());</p>
<p style="font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(52, 60, 252); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; bconf.setProperty(</span>"drools.dialect.java.compiler"<span style="color: #000000">, </span>"ECLIPSE"<span style="color: #000000">);</span></p>
<p style="font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(52, 60, 252); "><span style="color: #000000">&nbsp; &nbsp; &nbsp; &nbsp; bconf.setProperty(</span>"drools.dialect.java.lngLevel"<span style="color: #000000">, </span>"1.6"<span style="color: #000000">);</span></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; DecisionTableConfiguration dtableconfiguration =</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">                </span>KnowledgeBuilderFactory.newDecisionTableConfiguration();</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; dtableconfiguration.setInputType( DecisionTableInputType.<span style="color: #0b2dc9">XLS</span> );</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><br></p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; PackageBuilderConfiguration pconf = (PackageBuilderConfiguration) bconf;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; pconf.setClassLoaderCacheEnabled(<span style="color: #7f2a67">true</span>);</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; MVELDialectConfiguration conf = (MVELDialectConfiguration)pconf.getDialectConfiguration(<span style="color: #343cfc">"mvel"</span>);</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; conf.setStrict(<span style="color: #7f2a67">false</span>);</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; String compilerDumpDir = <span style="color: #0b2dc9">context</span>.getCompilerDumpDir();</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #7f2a67">if</span> (compilerDumpDir != <span style="color: #7f2a67">null</span> &amp;&amp; !compilerDumpDir.isEmpty())</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; {</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pconf.setDumpDir(<span style="color: #7f2a67">new</span> File(compilerDumpDir));</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; }</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kBase, bconf);</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="Apple-style-span" style="color: rgb(52, 60, 252); "><span style="color: #000000">kbuilder.add(ResourceFactory.newFileResource(</span></span><span class="Apple-style-span" style="color: rgb(52, 60, 252); ">"/tmp/templatetest.xls"</span><span class="Apple-style-span" style="color: rgb(52, 60, 252); "><span style="color: #000000">),</span></span></p>
<p style="color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResourceType.<span style="color: #0b2dc9">DTABLE</span>,</p>
<p style="color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dtableconfiguration);</p>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">&nbsp; &nbsp; }</span></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; "><br></span></div><div style="color: rgb(0, 0, 0); "><font class="Apple-style-span" face="Monaco" size="2"><br></font></div><div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px; "><br></div><span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com">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">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">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">olle.martensson@digitalroute.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br><br>
I'm using a knowledgeagent to point out a changeset XML which contains the<br>
following DTABLE:<br><br>
...<br>
&lt;resource source='file:/../templatetest.xls' type='DTABLE' /&gt;<br>
...<br><br>
when I compile I get the following error:<br><br>
Unable to Analyse Expression request == "/":<br>
[Error: unable to resolve method using strict-mode:<br>
ultra.Default.ultra.MYHTTPD.request()]<br>
[Near : {... request == "/" ....}]<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>
[Line: 7, Column: 10] : [Rule name='print the incoming query_9']<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'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 &nbsp;ultra.Default.ultra.MYHTTPD<br><br>
RuleTable &nbsp; &nbsp;print the incoming query<br>
CONDITION &nbsp; &nbsp; &nbsp; &nbsp;ACTION<br>
MYHTTPD<br>
request &nbsp;System.out.println($param);<br>
Matcher &nbsp;Logger<br>
/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"webserver root"<br><br>
Anybody who knows what this is about?<br><br>
Thanks // Olle<br><span class="HOEnZb"><font color="#888888"><br><br><br><br><br><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">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></blockquote></div><br></span></body></html>