-
1. Re: java.lang.LinkageError
haraldgliebe Jul 7, 2003 12:27 PM (in response to normann)JavaMail 1.3 is already in server/default/lib. Can you redeploy your ear if you remove this jar from the ear?
Regards,
Harald -
2. Re: java.lang.LinkageError
ghamamgian Jul 17, 2003 3:37 PM (in response to normann)We are actually having this problem as well but with ut own internal classes. When we redeploy our ear, the class loader vomits. When I look at the JMX Console, i notice that the ResourceAdapter from our ear is still listed in the jboss.managment.local section, even after we undeployed the ear.
-
3. Re: java.lang.LinkageError
frito Jul 18, 2003 1:07 AM (in response to normann)Be sure you have listed all your components in your application.xml properly. And be sure you have listed all your dependent jars for j2ee components in the Class-Path entry of your manifest file.
Greetings,
Frito -
4. Re: java.lang.LinkageError
normann Jul 21, 2003 5:34 AM (in response to normann)I removed my mail.jar but then it just complains at another time. It doesn't seem to be consistens on the first re-deployment, it may happen anytime.
I have made sure that all contained jar files are mentioned in app.xml, but it doesn't make a difference.
The latest exception is:
13:29:06,095 ERROR [BaseAction] Action error.
java.lang.LinkageError: Class dk/xxx/projects/site/j2ee/ejb/session/invoice/XxxInvoiceHome violates loader constraints
at dk.xxx.projects.site.j2ee.webapp.struts.invoice.action.InvoiceAction.doPerform(InvoiceAction.java:72)
at dk.xxx.util.struts.base.BaseAction.perform(BaseAction.java:50)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
at org.mortbay.http.HttpServer.service(HttpServer.java:863)
at org.jboss.jetty.Jetty.service(Jetty.java:460)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) -
5. Re: java.lang.LinkageError
frito Jul 23, 2003 3:46 AM (in response to normann)Did you list the dependent jars in the Class-Path of the manifest file (ejb jars) as mentioned above?
Deploy all the resources with your ear, use jboss-app.xml to configure an own class loader repository for your ear and java2ParentDelegaton=false .
This should work fine.
Greetings,
Frito -
6. Re: java.lang.LinkageError
normann Jul 30, 2003 10:20 AM (in response to normann)I have absolutely no clue about what you're talking about so I guess I need to read some documentation for it. Would you please kindly point me to a source of documentation for this?
-
7. Re: java.lang.LinkageError
frito Jul 30, 2003 11:30 AM (in response to normann)Some very useful information:
JBoss classloading:
http://prdownloads.sourceforge.net/jboss/ClassLoading.pdf?download
J2EE spec (chapter 8) Application Assembly And Deployment:
http://java.sun.com/j2ee/j2ee-1_3-fr-spec.pdf
And of course the JBoss forum ;-)
Greetings,
Frito -
8. Re: java.lang.LinkageError
rgc3679 Oct 13, 2003 4:36 PM (in response to normann)I wonder if normann ever got this working? I have the same problem,and have tried adding a manifest but it's still not working.
I'm using JBoss 3.0.4 on Linux.
My EAR has a server.jar, and a client.war. Both server.jar and client.war use mail.jar.
If I deploy the EAR and try to use the mail classes I get a linkage error.
If I remove the mail.jar from JBoss' default/lib and restart JBoss then my app works ok. Problem is, in order to redeploy my EAR I have to always restart JBoss.
Here's what my manifest.mf looks like:
Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1
tacplanner.ear:
meta-inf/application.xml
server.jar Class-Path: mail.jar
client.war Class-Path: mail.jar
mail.jar
The manifest is placed at same level as server.jar and client.war - in other words, it's not in a meta-inf dir because the deployer kept complaining about not finding meta-inf/application.xml.
Any ideas?
Thanks,
--BobC -
9. Re: java.lang.LinkageError
rgc3679 Oct 15, 2003 8:59 AM (in response to normann)This problem is solved.
My manifest had problems, once these were fixed the linkage problem went away.
Thanks to IntelliJ for having such a helpful tool!
--BobC -
10. Re: java.lang.LinkageError
rgc3679 Oct 15, 2003 9:02 AM (in response to normann)Here's the manifest that works for me:
Manifest-Version: 1.0
Class-Path: ../lib/mail.jar
--BobC