Classloader mismatch on what looks like the same class
Issue
- We are facing a class type mismatch issue but the error clearly shows the EXPECTED Class and GOT class are same. The same error disappears after clean restart of tmp files. Caused by: org.hibernate.TypeMismatchException: Provided id of the wrong type for class mypackage.MyClass. Expected: class mypackage.MyClassPK, got class mypackage.MyClassPK.
- We're seeing a ClassCastException where both of the classes have the same name. How can you have an error casting a class to itself?
- In our Switchyard project, we're having a problem SWITCHYARD010813: Cannot convert from 'com.ourclass' to 'com.ourclass' where both classes are the same exact package and classname. Why is this occurring and how can we solve it?
Environment
- JBoss Enterprise Application Platform (EAP) 6.x
- JBoss Enterprise Application Platform (EAP) 5.x
- JBoss Enterprise Application Platform (EAP) 4.x
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.
