<FONT face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=2><div>I am still getting the same error even after making that method as public... ??</div><div><br>Thanks<br>Deepak &nbsp;Jambhekar<br><br><div><br></div><font color="#990099">-----rules-users-bounces@lists.jboss.org wrote: -----<br><br></font><blockquote style="padding-right:0px;padding-left:5px;margin-left:5px;border-left:#000000 2px solid;margin-right:0px">To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>From: CK &lt;chrisckc@gmail.com&gt;<br>Sent by: rules-users-bounces@lists.jboss.org<br>Date: 12/02/2009 10:28PM<br>Subject: Re: [rules-users] Interface implementation not working..<br><br>Try changing your BOM_TRANSACTION_DETAILS Display() method access to public and see if it works.&nbsp;
<div><br></div><div>Currently, you have it as "void Display()" in your BOM_TRANSACTION_DETAILS method declaration. &nbsp;Change it to "public void Display()". &nbsp;It might solve your problem.
</div><div><br></div><div>No need to change method declaration in the interface as it's correct.
</div><div><br></div><div>-Chris
</div><div><div><br><div><div>On Dec 2, 2009, at 1:35 AM, Deepak Jambhekar wrote:
</div><br class="Apple-interchange-newline"><blockquote type="cite"><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><div 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></div><div 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></div><div 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></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 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></div><div 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></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 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></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><i>                
</i></span><i>tr.Display();
</i></div><div 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></div><br>And the Model class is defined as below...
</div><div><i><br></i></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font color="#7f0055"><i>interface
</i></font><i> Generalized
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><i>{
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><i>        
</i></span><font color="#7f0055"><i>void
</i></font><i> Display();
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; min-height: 15px; "><span class="Apple-tab-span" style="white-space:pre"><i>        
</i></span><span class="Apple-tab-span" style="white-space:pre"><i>        
</i></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><i>}
</i></div></div><div><i><br></i></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 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></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;getter and setter.....
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><i>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;void Display()
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><i>                
</i></span><i>{
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><i>                        
</i></span><i>.....
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre"><i>                
</i></span><i>}
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><i>}
</i></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 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></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><b>So is this because of Interface?? Can we use interface for defining Models..??
</b></div></div><div><br></div><div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><div 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></div><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><font face="Courier New,Courier,monospace" size="3">=====-----=====-----=====<br>Notice: The information contained in this e-mail<br>message and/or attachments to it may contain <br>confidential or privileged information. If you are <br>not the intended recipient, any dissemination, use, <br>review, distribution, printing or copying of the <br>information contained in this e-mail message <br>and/or attachments to it are strictly prohibited. If <br>you have received this communication in error, <br>please notify us by reply e-mail or telephone and <br>immediately and permanently delete the message <br>and any attachments. Thank you<br></font> _______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></div><font face="Courier New,Courier,monospace" size="3">_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></font>
</blockquote><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>