-
1. Re: EAR deploy fails in JBoss 4.2
alrubinger Feb 19, 2008 9:57 AM (in response to chandra_88)Does your EAR's application.xml descriptor reference the java module util.jar?
S,
ALR -
2. Re: EAR deploy fails in JBoss 4.2
chandra_88 Feb 20, 2008 1:29 AM (in response to chandra_88)Yes it does in this way.
Apologies i was getting a class not found exception not a class cast exception.
Applicaiton.xml under ear
==================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<display-name>ejbSession</display-name>
EjbSession.jar
<library-directory>lib</library-directory>
The util jar is kept under lib folder. Can you tell what is the correct way to mention it. -
3. Re: EAR deploy fails in JBoss 4.2
chandra_88 Feb 20, 2008 1:34 AM (in response to chandra_88)Looks like a problem with my prev reply in terms of display so sending it again.
The applicaiton.xml indirectly references the util jar by pointing to the lib directory where the util.jar is kept.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<display-name>ejbSession</display-name>
EjbSession.jar
<library-directory>lib</library-directory>
The util.jar is kept under lib directory and am getting a class not found exception -
4. Re: EAR deploy fails in JBoss 4.2
chandra_88 Feb 20, 2008 1:36 AM (in response to chandra_88)Iam not sure why the module tag is not getting displayed in the post
-
5. Re: EAR deploy fails in JBoss 4.2
alrubinger Feb 20, 2008 6:26 AM (in response to chandra_88)Should look like:
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"> <display-name>Foo</display-name> <!-- Libraries --> <module> <java>foo.jar</java> </module> .... </application>
In the example above, "foo.jar" is in the root of the EAR. If you want it in the "lib" directory, put "lib/foo.jar".
S,
ALR -
6. Re: EAR deploy fails in JBoss 4.2
chandra_88 Feb 20, 2008 8:26 AM (in response to chandra_88)Thanks for the reply . I have multiple util jars all from the JBoss 4.2 doc it says multiple jars can be specified in the lib folder and the lib folder can be presnet in the ear folder.
The lib folder is specified using the library-directory tag.
So if in the application.xml i mention
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<display-name>EjbSession</display-name>
<!-- Libraries -->
< module>
EjbSession.jar
< /module>
<library-directory>lib</library-directory>
All the common libraries present in the lib folder i presumed. I did try modifying the manifest entries in the ejb jar and then i get an exception saying no class loaders found for the ejb impl classes.
Manifest.MF
=============
Manifest-Version: 1.0
Class-Path: ../lib/commons-collections-3.2.jar ../lib/commons-configuration-1.5.jar ../lib/commons-lang-2.3.jar ../lib/commons-logging-1.1.1.jar
How do i specify multiple jars file using <library-directory> if it is not suppored i will try whatever is mentioned from you. -
7. Re: EAR deploy fails in JBoss 4.2
chandra_88 Feb 20, 2008 9:45 AM (in response to chandra_88)Thanks for the reply . I have multiple util jars all from the JBoss 4.2 doc it says multiple jars can be specified in the lib folder and the lib folder can be presnet in the ear folder.
The lib folder is specified using the library-directory tag.
So if in the application.xml i mention
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<display-name>EjbSession</display-name>
<!-- Libraries -->
< module>
EjbSession.jar
< /module>
<library-directory>lib</library-directory>
All the common libraries present in the lib folder i presumed. I did try modifying the manifest entries in the ejb jar and then i get an exception saying no class loaders found for the ejb impl classes.
Manifest.MF
=============
Manifest-Version: 1.0
Class-Path: ../lib/commons-collections-3.2.jar ../lib/commons-configuration-1.5.jar ../lib/commons-lang-2.3.jar ../lib/commons-logging-1.1.1.jar
How do i specify multiple jars file using <library-directory> if it is not suppored i will try whatever is mentioned from you.