-
1. Re: My ejb application can't see jar files
oldblue Feb 24, 2004 5:28 PM (in response to justjuice)I am experiencing this same problem.
Any answer? What am I missing?? -
2. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 7:57 AM (in response to justjuice)Does no one know the answer to this?? Is the question not clear?
Please help!! I'm stuck and don't know how to get my application to work! -
3. Re: My ejb application can't see jar files
formenti Feb 25, 2004 8:41 AM (in response to justjuice)I can't help you but I found useful this lecture about classloading: http://webdev.apl.jhu.edu/~jcs/corej2ee.spring03/deploy/doc/book/public/02_J2EE_Application_Components.pdf
I hope this can help you!
Gio -
4. Re: My ejb application can't see jar files
triathlon98 Feb 25, 2004 8:55 AM (in response to justjuice)Why not forget about the reference in the manifest file and add the library file as module in your application.xml?
That is likely to cause less problems when redeploying as well.
Joachim -
5. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 10:07 AM (in response to justjuice)I originally tried the reference in the application.xml. Didn't work. I then tried the classpath in the manifest file. Didn't work.
Something doesn't seem right.
This was an app created in a WebLogic environment and I've been tasked with "porting" it to JBoss. -
6. Re: My ejb application can't see jar files
triathlon98 Feb 25, 2004 10:44 AM (in response to justjuice)Post the application.xml you used to reference it from there.
It might help to not put the library file in a subdirectory.
Joachim -
7. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 11:17 AM (in response to justjuice)I'll show you what I had in WebLogic. Here's what I have in my ear:
DocumentBean.jar
MessageDocumentBean.jar
MessageLoggingBean.jar
TRIF.war
APP-INF/lib/SharedUtils.jar
meta-inf/application.xml
meta-inf/Manifest.mf
Here's my Manifest.mf:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: 1.4.2_03-b02 (Sun Microsystems Inc.)
Here's my application.xml:
<?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>TRIF</display-name>
TradeRanger Infrastructure
DocumentBean.jar
MessageLoggingBean.jar
MessageDocumentBean.jar
<web-uri>TRIF.war</web-uri>
<context-root/>
I've tried adding a Class-Path attribute to the manifest with no success.
I've tried adding a module element to the application.xml with no success. (I even tried all three types of modules besides web just for the sake of trying.) So something like SharedUtils.jar
And I've tried putting the SharedUtils.jar in just a lib subdirectory (no APP-INF above it), and tried putting it in no subdirectory.
It's a class withing the SharedUtils.jar that can't seem to be found at runtime. Do I need to create a directory structure under the lib directory that mimicks my package structure? (I know this is done in the classes directory in a web app.) -
8. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 11:25 AM (in response to justjuice)Sorry the xml in the application.xml isn't showing up properly. Should be:
TradeRanger Infrastructure
DocumentBean.jar
and so on. -
9. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 1:59 PM (in response to justjuice)Hmm.... If I take the SharedUtils.jar out of the ear and just drop it into the deploy directory, the app can find the classes.
-
10. Re: My ejb application can't see jar files
triathlon98 Feb 25, 2004 2:27 PM (in response to justjuice)I am sure that referencing the jar from inside application.xml works.
As the xml snipped got eaten (you need to put it in a code block), here is a (working) application.xml from one of my projects:<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'> <application> <display-name>IC-trace</display-name> <!-- libraries --> <module> <java>cabsoft.jar</java> </module> <module> <java>uni-d-client.jar</java> </module> <module> <java>resources.jar</java> </module> <!-- actual IC-trace server-side components --> <module> <ejb>core.jar</ejb> </module> <module> <web> <web-uri>ws.war</web-uri> <context-root>/ws/1.0</context-root> </web> </module> <module> <web> <web-uri>ic-trace.war</web-uri> <context-root>/</context-root> </web> </module> <module> <web> <web-uri>admin.war</web-uri> <context-root>/admin</context-root> </web> </module> </application>
Hope that helps.
Joachim -
11. Re: My ejb application can't see jar files
oldblue Feb 25, 2004 3:01 PM (in response to justjuice)Thanks Joachim. Your persistence telling me to put it in my application.xml got me to thinking. I think it's working now after I added this:
<module> <java>APP-INF/lib/SharedUtils.jar</java> </module>
Interesting that in all the documents I've seen, I've never seen one that added the path. But it works.