Hello all,
I got a problem with JBoss > 3.0.6 (3.2.1 and 4DR).
I coded some library classes as source.
Those classes i use for 2 J2EE Projekts of mine. I do NOT use a Jar for
the compiled library classes. I use and compile them into each projekt
as source. (extra source branch).
For each Projekt i build an Ear File containing several jars (holding
EJBs). I deploy both Ears in a single JBoss 3.2.1 Instance. Not
Clustering etc. Simple Default/Deploy.
In each Ear File is at least ONE jar File containing my compiled classes
from the Lib. These jar files contain EJBs (Session, Entity) that use
some of those LIB-Classes as Parameters or Return Values.
While deploying under JBoss 3.2.1 and/or JBoss 4DR i first get a warning
that a specific class (One of my library classes) is contained in two
different ears.
Then i get an Error that one of my EJBs is not conform to the specs
because the methods of the remote interface do not match those in the
Bean Class itself.
Looks like he tries to use a Class from one EAR File in the other EAR File.
Is this Conform to any Spec?
I should be able to use the same class in different EAR Files without
bundling it as extra JAR?
JBoss 3.0.6 does NOT have that problem. Works fine !!
Hope you can help me.
The Exact JBoss Warning is as follows
The two EARS are SecurityManagement.ear and CustomerManagement.ear
09:35:24,515 WARN [ClassLoadingTask] Duplicate class found:
de.heitec.empic.security.model.vo.UserVO
Current CS:
file:/I:/java/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/SecurityManagement.ear/38.SecurityManagement.ear-contents/SecurityManagementService.jar
<no certificates>)
Duplicate CS:
file:/I:/java/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/CustomerManagement.ear/37.CustomerManagement.ear-contents/CustomerManagementEB.jar
<no certificates>)
09:35:24,531 WARN [verifier] EJB spec violation:
Bean : SecurityManagementBean
Method : public abstract UpdateStack createUser(String, UserVO,
UpdateStack) throws RemoteException, EJBException
Section: 7.10.5
Warning: The methods defined in the remote interface must have a
matching method in the bean's class with the same name and same number
and types of arguments.
Volker
Marek Lange - 28 Aug 2003 09:17 GMT
Volker,
> I got a problem with JBoss > 3.0.6 (3.2.1 and 4DR).
> I coded some library classes as source.
[quoted text clipped - 18 lines]
> Looks like he tries to use a Class from one EAR File in the other EAR File.
> Is this Conform to any Spec?
JBoss uses a classloader architecture which allows to use classes from
another ear - the unified classloader. That is why JBoss complains about
your duplicate classes.
> I should be able to use the same class in different EAR Files without
> bundling it as extra JAR?
> JBoss 3.0.6 does NOT have that problem. Works fine !!
You can define the classloader per ear: add a file jboss-app.xml (on the
application.xml level) with the following syntax:
<jboss-app>
<loader-repository>
your.package:loader=yourEar.ear
</loader-repository>
</jboss-app>
> The Exact JBoss Warning is as follows
> The two EARS are SecurityManagement.ear and CustomerManagement.ear
[quoted text clipped - 15 lines]
> matching method in the bean's class with the same name and same number
> and types of arguments.
There must be sth. wrong with the SecurityManagementBean which does not
follow the spec. Check the method createUser in the bean and in your
interface. The return type and the exceptions thrown must be the same.
-marek