Classloader in EAR with 2 seperate WAR

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Classloader in EAR with 2 seperate WAR

"Jan-Philipp Hülshoff (public)"
I am currently working on a J2EE Project. We have one EAR with a EJB
Project and a Web Project. We now need to migrate to a new Web Library
and need both of the Web Projects working on the same EJB's. The problem
now is that the new version of the web library contain classes with the
same name but different functionality/code.

 + EJB Project
 + WAR (Vaadin 6)
 + WAR (Vaadin 7)

If i load the ear into Geronimo everything deploys without exceptions.
But it seems that the classes are not separated between the 2 WAR's.
This leads to ClassCastException's and other errors.
I also read the thread "classloading problem for WARs in an EAR file
share classpath" which seems to discuss a similiar problem. But i was
not able to derive a solution from the description.
How do i solve that problem?

Additionally the ServLet in the second WAR is annotated with
@WebServlet. This maps the servlet into _both_ war url's which is _not
desired_. I consider this a bug. Is that correct?

Also our project suffers from this bug
Is there a solution on the way?

Any help is appreciated.

Kind regards,
 Jan-Philipp Hülshoff