How do I correct ClassCastException when libraries are duplicated across EJB and Web Modules in JBoss

Solution Unverified - Updated -

Issue

We have 2 modules in our EAR file : WEB and EJB.

The two modules exchange java instance of the same class but the library is in the EAR/lib directory and WEB-INF/lib. The WEB module pass instance to EJB module and get ClassCastException.

Do you have some trick for solve this issue ?

Environment

  • Enterprise Application Platform(EAP) 5.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content