In the BRMS I added the classes to a specific classloader that I pass into the package configuration (as I have classes that are loaded on the fly - similar to generated). <br><br>Look at the getInstance method of <a href="http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/builder/BRMSPackageBuilder.java">
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-jbrms/src/main/java/org/drools/brms/server/builder/BRMSPackageBuilder.java</a><br><br>That adds classes to a custom classloader that the package builder uses (without adding it to the apps classpath - although any classes on the apps classpath will be available of course).
<br><br>If you look at the BRMS code I am sure you can copy some of that.<br><br>Michael.<br><br><br><div><span class="gmail_quote">On 5/24/07, <b class="gmail_sendername"><a href="mailto:Jordan.Parker@sungard.com">Jordan.Parker@sungard.com
</a></b> <<a href="mailto:Jordan.Parker@sungard.com">Jordan.Parker@sungard.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;">
<br><font face="Times New Roman" size="3">We're having a class loader issue
compiling rules that use dynamically generated java beans as facts when
deploying our application on JBoss Application Server, versions 4.0.3SP1
and 4.0.5. We're using JBoss Rules 4.0.0.MR2 and the Janino compiler.
When deploying to WebLogic 9.2, there are no issues compiling or
executing those same rules.</font>
<br>
<br><font face="Times New Roman" size="3">We've tried setting the class
loader several different ways, including using the method Edson suggests
in his blog entry on using dynamically generated classes. The issue
seems to be with the JBoss class loader UnifiedClassLoader3, which contains
a list of blacklisted classes. If I cast the context class loader
to UnifiedClassLoader3, and call '</font><a href="http://docs.jboss.com/jbossas/javadoc/4.0.3SP1/jmx/org/jboss/mx/loading/RepositoryClassLoader.html%5ClclearBlackLists%28%29" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
<font face="Times New Roman" size="3">clearBlackLists</font></a><font face="Times New Roman" size="3">()'
before compiling the rules, the rules compile and execute without any issues.
Otherwise, I get the error 'Unable to resolve ObjectType 'NameOfGeneratedClass''.</font>
<br>
<br><font face="Times New Roman" size="3">My question is has anyone run across
this issue before, or does anyone have a solution to this problem that
doesn't require application server specific code (casting and calling
the clearBlackLists method)?</font>
<br>
<br><font face="sans-serif" size="2">Thank you,</font>
<br>
<br><font face="sans-serif" size="2">Jordan Parker</font>
<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>