<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><div><br></div><div>Hi....</div><div><br></div><div>I have created a rule which is as below</div><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#008000"><font color="#960000"><i>rule</i></font><font color="#000000"><i> </i></font><i>"myrule"</i></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#960000"><font color="#000000"><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span></font><i>dialect</i><font color="#000000"><i> </i></font><font color="#008000"><i>"mvel"</i></font></font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#960000"><font color="#000000"><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span></font><i>when</i></font></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                </i></span><i>tr : BOM_TRANSACTION_DETAILS( country == </i><font color="#008000"><i>"CH"</i></font><i> )</i></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#960000"><font color="#000000"><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span></font><i>then</i></font></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                </i></span><i>tr.setCarrierName( </i><font color="#008000"><i>"orange"</i></font><i> );</i></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                </i></span><i>tr.Display();</i></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#960000"><i>end</i></font></p><br>And the Model class is defined as below...</div><div><i><br></i></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font color="#7f0055"><i>interface</i></font><i> Generalized</i></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><i>{</i></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span><font color="#7f0055"><i>void</i></font><i> Display();</i></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span><span class="Apple-tab-span" style="white-space:pre"><i>        </i></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><i>}</i></p></div><div><i><br></i></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><font color="#7f0055"><i>public</i></font><i> </i><font color="#7f0055"><i>class</i></font><i> BOM_TRANSACTION_DETAILS </i><font color="#7f0055"><i>implements</i></font><i> Generalized {</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getter and setter.....</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;void Display()</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                </i></span><i>{</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                        </i></span><i>.....</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span class="Apple-tab-span" style="white-space:pre"><i>                </i></span><i>}</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><i>}</i></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><b>Now when I run this rule, it is giving me the following exception . Can any one please help me why this exception is coming....? and also when I removed the Display() from interface Generalized the code works fine...</b></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><b>So is this because of Interface?? Can we use interface for defining Models..??</b></p></div><div><br></div><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span style="text-decoration: underline; "><font color="#000080">org.drools.runtime.rule.ConsequenceException</font></span>: [Error: tr.Display(): Class org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a member of class com.drools.icas.transaction.Generalized with modifiers "public abstract"]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">[Near : {... Unknown ....}]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">[Line: 1, Column: 0]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(<span style="text-decoration: underline; "><font color="#000080">DefaultConsequenceExceptionHandler.java:23</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.DefaultAgenda.fireActivation(<span style="text-decoration: underline; "><font color="#000080">DefaultAgenda.java:943</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.DefaultAgenda.fireNextItem(<span style="text-decoration: underline; "><font color="#000080">DefaultAgenda.java:885</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.DefaultAgenda.fireAllRules(<span style="text-decoration: underline; "><font color="#000080">DefaultAgenda.java:1082</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.AbstractWorkingMemory.fireAllRules(<span style="text-decoration: underline; "><font color="#000080">AbstractWorkingMemory.java:682</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.AbstractWorkingMemory.fireAllRules(<span style="text-decoration: underline; "><font color="#000080">AbstractWorkingMemory.java:649</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(<span style="text-decoration: underline; "><font color="#000080">StatefulKnowledgeSessionImpl.java:177</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at com.drools.icas.transaction.DemoTest.main(<span style="text-decoration: underline; "><font color="#000080">DemoTest.java:92</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">Caused by: [Error: tr.Display(): Class org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a member of class com.drools.icas.transaction.Generalized with modifiers "public abstract"]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">[Near : {... Unknown ....}]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">[Line: 1, Column: 0]</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(<span style="text-decoration: underline; "><font color="#000080">ReflectiveAccessorOptimizer.java:382</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(<span style="text-decoration: underline; "><font color="#000080">ReflectiveAccessorOptimizer.java:140</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.ast.ASTNode.getReducedValueAccelerated(<span style="text-decoration: underline; "><font color="#000080">ASTNode.java:137</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.MVELRuntime.execute(<span style="text-decoration: underline; "><font color="#000080">MVELRuntime.java:91</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.compiler.CompiledExpression.getValue(<span style="text-decoration: underline; "><font color="#000080">CompiledExpression.java:101</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.MVEL.executeExpression(<span style="text-decoration: underline; "><font color="#000080">MVEL.java:968</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.base.mvel.MVELConsequence.evaluate(<span style="text-decoration: underline; "><font color="#000080">MVELConsequence.java:89</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.DefaultAgenda.fireActivation(<span style="text-decoration: underline; "><font color="#000080">DefaultAgenda.java:934</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>... 6 more</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000">Caused by: <span style="text-decoration: underline; "><font color="#000080">java.lang.IllegalAccessException</font></span>: Class org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer can not access a member of class com.drools.icas.transaction.Generalized with modifiers "public abstract"</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at sun.reflect.Reflection.ensureMemberAccess(<span style="text-decoration: underline; "><font color="#000080">Reflection.java:65</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at java.lang.reflect.Method.invoke(<span style="text-decoration: underline; "><font color="#000080">Method.java:583</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(<span style="text-decoration: underline; "><font color="#000080">ReflectiveAccessorOptimizer.java:936</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(<span style="text-decoration: underline; "><font color="#000080">ReflectiveAccessorOptimizer.java:321</font></span>)</font></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#ff0000"><span class="Apple-tab-span" style="white-space:pre">        </span>... 13 more</font></p><div><font class="Apple-style-span" color="#FF0000" face="Monaco, Verdana, Arial, Helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 11px; "><br></span></font></div></div><div><br></div><div><br></div><div>Thanks....</div><div><br></div><div>Deepak &nbsp;Jambhekar<br><br></div></FONT><pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


</pre>