<br> There was a problem with CGLIB proxies much similar to this... so probably the same problem.<br><br> What happens is that to shadow a fact, drools needs to extend the actual class being asserted, and override the equals and hashcode methods. So, the class can't be final, nor these methods can be final. Previously I wasn't checking for final on these methods and that was the reason for the error.
<br> <br> I fixed that in trunk. It means, if XML Beans are generating methods equals/hashCode as final, drools won't be able to shadow them (and so will automatically disable shadowing for them), but it will not raise the error anymore.
<br><br> Let me know if it is still a problem for you in trunk.<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/7/5, Ronald R. DiFrango <<a href="mailto:ron.difrango@gmail.com">ron.difrango@gmail.com
</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">All this sounds eerily similar to the problem I am reporting. In the 4.0 version I am getting the following exception on those inner classes:
<br><br>Exception in thread "main" java.lang.VerifyError: class com.circuitcity.rtvcrms.impl.DetailLineDocumentImpl$DetailLineImplShadowProxy
overrides final method ã Ý*h '+ .û Ý*h '+ <br> at java.lang.ClassLoader.defineClass1(Native Method)<br> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)<br> at java.lang.ClassLoader.defineClass
(ClassLoader.java:465)<br> at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:40)<br> at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:59)<br> at java.lang.ClassLoader.loadClass
(ClassLoader.java:251)<br> at org.drools.reteoo.Rete$ObjectTypeConf.<init>(Rete.java:352)<br> at org.drools.reteoo.Rete.assertObject(Rete.java:152)<br> at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java
:190)<br> at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)<br> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)<br> at org.drools.common.AbstractWorkingMemory.insert
(AbstractWorkingMemory.java:584)<br> at com.circuitcity.rtvcrms.rules.RtvDecisionEngine.processDetailLines(RtvDecisionEngine.java:95)<br> at com.circuitcity.rtvcrms.rules.RtvDecisionEngine.executeRules(RtvDecisionEngine.java
:64)<br> at com.circuitcity.rtvcrms.test.MainBasedTester.main(MainBasedTester.java:34)<br><br>The catch is that XML Beans objects are auto generated based upon and XSD and we have limited control over what gets generated.
<div><span class="e" id="q_113981398f4c395d_1"><br><br><div><span class="gmail_quote">On 7/5/07, <b class="gmail_sendername">Narendra Valada</b> <<a href="mailto:narendra.valada@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
narendra.valada@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Thank you for your quick response. </div>
<div> </div>
<div>I cannot make the Outer class static and public since it is not an inner class. </div>
<div> </div>
<div>In my example, I have two inner classes : Inner and InnerInner.</div>
<div> </div>
<div>Class Inner is enclosed by Outer and class InnerInner is enclosed by Inner. I get the "Unable to resolve object type" error only on the "InnerInner" class and not on the "Inner" class.
</div>
<div> </div>
<div>Both the inner classes are defined as non-static. </div>
<div> </div>
<div>Thanks,</div><span>
<div> </div>
<div>Narendra</div></span><div><span>
<div> </div>
<div><br> </div>
<div><span class="gmail_quote">On 7/5/07, <b class="gmail_sendername">Mark Proctor</b> <<a href="mailto:mproctor@codehaus.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mproctor@codehaus.org
</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">you need to make your Outer class static and public. Look at the sample generated with a new drools project, that uses a static public class.<br><br>Mark<br>Narendra Valada wrote:
<blockquote type="cite">
<div><span><b><font color="#960000" size="2">
</font></b><div align="left"><b><font color="#960000" size="2">Hello,</font></b></div>
<div align="left"><b><font color="#960000" size="2"> </font></b></div>
<div align="left"><b><font color="#960000" size="2">I am getting an "Unable to resolve object type" error on certain XML Bean generated inner classes. I get this error only on inner classes that have been defined within other inner classes. Please see example below.
</font></b></div>
<div align="left"><b><font color="#960000" size="2"> </font></b></div>
<div align="left"><b><font color="#960000" size="2">Is this a known limitation of JBoss Rules (I am using JBOSS Rules 3.0.6) or the JANINO compiler?</font></b></div>
<div align="left"><b><font color="#960000" size="2"> </font></b></div>
<div align="left"><b><font color="#960000" size="2">Thanks.</font></b></div>
<div align="left"><b><font color="#960000" size="2"><b><font color="#7f0055" size="2">
<p align="left">package</p></font></b></font></b></div><b><font size="2">com.sample; </font><b><font color="#7f0055" size="2">
<p align="left">public</p></font></b><font size="2"></font><b><font color="#7f0055" size="2">class</font></b><font size="2"> Outer{ </font><b><font color="#7f0055" size="2"> public</font></b><font size="2"> </font><b>
<font color="#7f0055" size="2">class</font></b><font size="2"> Inner { </font><b><font color="#7f0055" size="2"> public</font></b><font size="2"> </font><b><font color="#7f0055" size="2">boolean</font></b><font size="2">
</font><font color="#0000c0" size="2">inner</font> <font size="2">=</font><b><font color="#7f0055" size="2">false</font></b><font size="2">; </font><b><font color="#7f0055" size="2"> public</font></b><font size="2">
</font><b><font color="#7f0055" size="2">class</font></b><font size="2"> InnerInner {
<p align="left"> }</p>
<p align="left"> }</p>
<p align="left">}</p></font>
</b><div align="left"><b>package</b></div><font size="2">com.sample </font><b><font color="#960000" size="2">
<p align="left">import</p></font></b><font size="2">com.sample.Outer1.Inner.InnerInner; </font><b><font color="#960000" size="2">
<p align="left">rule</p></font></b><font size="2"></font><font color="#008000" size="2">"Hello World 1"</font><font size="2"> </font><b><font color="#960000" size="2">when</font></b><font size="2">
<p align="left">InnerInner()</p></font><b><font color="#960000" size="2">then</font></b><font size="2">
<p align="left">System.out.println(</p></font><font color="#008000" size="2">""</font><font size="2">);</font><b><font color="#960000" size="2">
<p>end</p></font></b></span></div><pre><hr size="4" width="90%">
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org
<br></a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre></blockquote><br> </div><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
rules-users@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br>
</span></div><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org
</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div>
<br>
</span></div><br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" 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><br clear="all"><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>