Cached Method object cannot be used on different instances of same class
Issue
I have a situation where a class is loading objects and using Reflection to invoke a method. The method is cached for future invocation for performance reasons. On future invocations, we get an error even though it is for the same class.
java.lang.IllegalArgumentException: object is not an instance of declaring class
The bean class is located in several jars which are added to the deployment artifact, however they should all be the same compilation. In other words, they are the same compiled object.
Environment
- JBoss Enterprise Application Platform (EAP) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
