- This topic has 11 replies, 3 voices, and was last updated 16 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
frankc01aMemberI have mail.jar and activation.jar in the tomcat shared and it seems to collide with the same that are embedded in the JAX-WS libraries that are deployed.
What is the prefered method for resolving? Should I remove the same jars from JAX-WS?
Frank
July 8, 2008 at 9:22 am #286848
Loyal WaterMemberThe libs are conflicting while deployment? You should create a user library with these jars and add the user library to the project. Now go to Windows > Prefs > MyEclipse > Web > Deployment and uncheck “jars on web project’s user library “.
Let me know if this helps.
July 8, 2008 at 7:50 pm #286879
frankc01aMemberThe problem is that the mail.jar and activation.jar are embedded in JAX-WS 2.1 Runtime Libraries (Project Metro) in the webservices-extra.jar so when that deploys with the application (which is should) I run into the problem.
July 10, 2008 at 8:37 pm #286996
frankc01aMemberAnything?
July 14, 2008 at 2:24 pm #287110
Riyad KallaMemberFrank, there isn’t much finesse to this unfortunately, this can happen frequently whenever you use a framework that has a large dependency footprint (like Hibernate, Spring, etc.).
I suppose first, since your app *is* working with the JARs in Tomcat, to remove them from the Web Services library, You can do that from Window > Prefs > MyEclipse > Project Capabilities.
You have to completely remove your deployment then redeploy it to make sure the dupe libraries are removed from the web app itself.
If JAX-WS works with the activation/mail JARs that ship in Tomcat, you are home free. If not, then try the flip-flop.
I saw from your other thread (https://www.genuitec.com/forums/topic/defect-using-jax-ws-and-mail-jar-activation-jar/&highlight=) that didn’t work out too well cause your code failed to run with a mis-cast of classes with the same name but I guess different bytecode.
July 14, 2008 at 5:12 pm #287120
frankc01aMemberOK Riyad, I will focus it here but this is something I consider a defect:
WIth as much respect as I can I would encourage ME to test the following:
1. Create a web application that uses JMS to send an email from a servlet
2. Deploy the app on Tomcat 6.x and pay attention to where YOU have to put mail.jar and activation.jar from JAF
3. Afterwords, add a web service routine that has nothing to do with email
4. Redeploy that… recreating the problem
5. Determine what the fix is and postI’ve already tried:
1. Removing the mail.jar and activation.jar from tomcat LIB to no avail
2. Attempted to go to Prefs->ME->Project Capabilities to remove them from Web Services … to no avail.
2.A: I found them in the Web Service XFire 1.2 core list but removing those two did nothing…HELP!!!!
July 16, 2008 at 5:55 am #287170
frankc01aMemberWhat is interesting is that the JAX-WS libraries contain the mail.jar and activation.jar and when I used Prefs->ME->Project Capabilities and removed them from the XFire 1.2 core they were not removed from the JAX-WS libraries that are deployed with the application.
I could unjar JAX-WS and remove them but I really don’t like the idea of doing that with every update of ME
July 17, 2008 at 5:43 am #287212
frankc01aMemberHello?
July 17, 2008 at 11:33 am #287222
Riyad KallaMemberSorry Frank, I didn’t get reply notifications for this thread, I just checked it manually and saw you replied a few times.
Are you working with JavaEE 5 projects or J2EE 1.4 projects? You mentioned JAX-WS, so I have to imagine JavaEE 5 right? In that case those libs are part of the spec now.
Also the XFire project capabilities that you removed the libs from don’t effect the JAX-WS stuff at all, I was mixed up on which web spec we were using; there are no custom JAX-WS libraries for JAX-WS Web Services because it’s part of the EE 5 spec.
So in your example above with the servlet sending mail, you just want to remove any extra mail/activation libs you are shipping in your app server *or* with your web project and just use the JavaEE 5 libraries straight… javax.activation, javax.mail and web service stuff is all in there.
Then when you deploy it, away you go.
The *problem* is that Tomcat is not a complete Java EE 5 app server, so you may need to hunt around for the exact compatible versions of activation and mail that you need to install to give it that functionality.
My suggestion? Install Glassfish 2 and use it… it’s easy to use like Tomcat, but a complete Java EE 5 app server so you don’t have to worry about that stuff. It’s also got a nice admin interface which can be handy when debugging JNDI lookups and stuff.
July 17, 2008 at 10:31 pm #287259
frankc01aMemberRiyad
J2EE 5 … yes
I outlined how changing anything with your distribution still causes. Everything was working fine before adding in the JAX-WS distribution you have. So, if I read what you are saying, is that the JAX-WS distribution with J2EE on Tomcat will not work for email. Is that correct?
July 20, 2008 at 5:22 am #287308
frankc01aMemberSolution:
Deploy JAX-WS distribution libraries to /tomcat6/lib
July 22, 2008 at 11:49 am #287392
Riyad KallaMemberFrank thanks for posting your solution for Tomcat.
-
AuthorPosts