You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by "Jan-Philipp Hülshoff (public)" <li...@bklosr.de> on 2014/04/01 12:07:35 UTC

Classloader in EAR with 2 seperate WAR

Hello,
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.

EAR
 + 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
https://issues.apache.org/jira/browse/GERONIMO-5800
Is there a solution on the way?

Any help is appreciated.

Kind regards,
 Jan-Philipp Hülshoff