I'm not sure why loading from web-inf / lib will not work. Most likely, the cool bootloader is different.
Take the first two steps for diagnosis. After that, try one of the two options below to fix the problem.
1) Check if the class loaders are the same by comparing rs.getObject().getClass('RATINGOBJ').getClassLoader() and oracle.sql.ARRAY.class.getClassLoader() If you execute equals between two class loaders, it should return false, because it looks like class loaders are different. Check explanation in ClassCastException when casting to one class
This issue has already been reported earlier on another forum at https://forums.oracle.com/message/9330314 . Moving banners to jboss will still lead to the same problems.
2) Find out the source banks from which classes are loaded, and delete the bank that you do not need. Find banks for two different classes by checking rs.getObject().getClass('RATINGOBJ').getProtectionDomain().getCodeSource().getLocation() oracle.sql.ARRAY.class.getProtectionDomain().getCodeSource().getLocation() - Determine from which JAR file the class belongs
Possible solutions:
a) If you need both banks, you will have to move the bank rs.getObject().getClass('RATINGOBJ').getProtectionDomain().getCodeSource().getLocation()
and create the module listed at http://www.javaworld.com/community/node/8184 .
b) If you still cannot load the classes as you expect, specify the library in the jboss server library.
c) The final solution for forcing classes to be loaded from a specific bank is to specify a jar in the bootclasspath.
source share