<br><font size=2 face="sans-serif">Hi folks,</font>
<br>
<br><font size=2 face="sans-serif">From the &quot;Should I be loading a
JIRA or have I just mucked up?&quot; files:</font>
<br>
<br><font size=2 face="sans-serif">The following import line makes all
of the functions in that class available from ctrl-space for rules marked
with both Mvel and Java (and not specified) dialects</font>
<br>
<br><font size=2 face="sans-serif">import function bnz.btt.mylend.common.model.utils.DecisionHelper.*;</font>
<br>
<br><font size=2 face="sans-serif">It compiles fine, and runs fine from
any class _not_ marked as dialect &quot;mvel&quot;</font>
<br>
<br><font size=2 face="sans-serif">However when I actually execute any
of those functions from a rule marked with dialect &quot;mvel&quot; the
following occurs:</font>
<br>
<br><font size=2 face="sans-serif">(In this example I'm calling from the
DecisionHelper the static method createSystemCreditDecisionReason)</font>
<br><font size=2 face="sans-serif">___________________________________<br>
</font>
<br><font size=2 color=#000080 face="Courier New"><u>org.drools.runtime.rule.ConsequenceException</u></font><font size=2 color=red face="Courier New">:
rule: CAP 06 Rule</font>
<br>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(</font><font size=2 color=#000080 face="Courier New"><u>DefaultConsequenceExceptionHandler.java:23</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.DefaultAgenda.fireActivation(</font><font size=2 color=#000080 face="Courier New"><u>DefaultAgenda.java:981</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.DefaultAgenda.fireNextItem(</font><font size=2 color=#000080 face="Courier New"><u>DefaultAgenda.java:918</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.DefaultAgenda.fireAllRules(</font><font size=2 color=#000080 face="Courier New"><u>DefaultAgenda.java:1130</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.AbstractWorkingMemory.fireAllRules(</font><font size=2 color=#000080 face="Courier New"><u>AbstractWorkingMemory.java:740</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.AbstractWorkingMemory.fireAllRules(</font><font size=2 color=#000080 face="Courier New"><u>AbstractWorkingMemory.java:706</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(</font><font size=2 color=#000080 face="Courier New"><u>StatefulKnowledgeSessionImpl.java:200</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at bnz.btt.mylend.rules.test.MyLendingRulesTest.main(</font><font size=2 color=#000080 face="Courier New"><u>MyLendingRulesTest.java:83</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">Caused by: [Error: unable
to access property (null parent): createSystemCreditDecisionReason]</font>
<br><font size=2 color=red face="Courier New">[Near : {... Unknown ....}]</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;^</font>
<br><font size=2 color=red face="Courier New">[Line: 1, Column: 0]</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:886</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:314</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(</font><font size=2 color=#000080 face="Courier New"><u>ReflectiveAccessorOptimizer.java:137</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(</font><font size=2 color=#000080 face="Courier New"><u>ASTNode.java:137</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.MVELRuntime.execute(</font><font size=2 color=#000080 face="Courier New"><u>MVELRuntime.java:85</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.compiler.CompiledExpression.getValue(</font><font size=2 color=#000080 face="Courier New"><u>CompiledExpression.java:104</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.mvel2.MVEL.executeExpression(</font><font size=2 color=#000080 face="Courier New"><u>MVEL.java:1001</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.base.mvel.MVELConsequence.evaluate(</font><font size=2 color=#000080 face="Courier New"><u>MVELConsequence.java:87</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
at org.drools.common.DefaultAgenda.fireActivation(</font><font size=2 color=#000080 face="Courier New"><u>DefaultAgenda.java:972</u></font><font size=2 color=red face="Courier New">)</font>
<br><font size=2 color=red face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp;
... 6 more</font>
<br><font size=2 face="sans-serif">___________________________________<br>
</font>
<br>
<br><font size=2 face="sans-serif">There is a work-around: If I import
each function separately it works just fine, eg:</font>
<br><font size=2 face="sans-serif">___________________________________<br>
</font>
<br><font size=2 face="sans-serif">import function bnz.btt.mylend.common.model.utils.DecisionHelper.createSystemCreditDecisionReason;</font>
<br><font size=2 face="sans-serif">___________________________________<br>
</font>
<br><font size=2 face="sans-serif">But as far as I can tell the &quot;.*&quot;
notation to import all functions from a class SHOULD work.</font>
<br>
<br>
<br><font size=2 face="sans-serif">So: Should I JIRA this, or have I just
done something wrong?</font>
<br>
<br><font size=2 face="sans-serif">Thanks!</font>
<br><font size=2 face="sans-serif"><br>
</font><font size=1 face="Arial"><b>Travis Smith</b><br>
Analyst Programmer<br>
Development Centre<br>
BNZ<br>
<br>
DDI: +644 4746356 (Or Ext 76356)</font><pre>
CAUTION - This message may contain privileged and confidential information 
intended only for the use of the addressee named above. If you are not the 
intended recipient of this message you are hereby notified that any use, 
dissemination, distribution or reproduction of this message is prohibited. 
This email was sent by the Bank of New Zealand. You can contact us on 
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those 
of the individual sender and may not necessarily reflect the views of Bank 
of New Zealand.
</pre>