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.
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 ‘
clearBlackLists()’ before compiling the rules, the rules compile and
execute without any issues. Otherwise, I get the error ‘Unable to resolve
ObjectType 'NameOfGeneratedClass'’.
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)?
Thank you,
Jordan Parker