Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Author Message
frankc01a
Post subject: JAX-WS, Mail and Activation  PostPosted: Jul 08, 2008 - 12:11 PM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

I 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
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 08, 2008 - 03:22 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5657

The 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.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 09, 2008 - 01:50 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

The 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.
 
 View user's profile Send private message  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 11, 2008 - 02:37 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

Anything?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 14, 2008 - 08:24 PM
Moderator
Moderator


Joined: Jan 06, 2004
Posts: 23305

Frank, 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 (http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=21292&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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 14, 2008 - 11:12 PM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

OK 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 post

I'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!!!!
 
 View user's profile Send private message  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 16, 2008 - 11:55 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

What 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
 
 View user's profile Send private message  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 17, 2008 - 11:43 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

Hello?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 17, 2008 - 05:33 PM
Moderator
Moderator


Joined: Jan 06, 2004
Posts: 23305

Sorry 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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 18, 2008 - 04:31 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

Riyad

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?
 
 View user's profile Send private message  
Reply with quote Back to top
frankc01a
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 20, 2008 - 11:22 AM
Registered Member
Registered Member


Joined: Apr 25, 2005
Posts: 80

Solution:

Deploy JAX-WS distribution libraries to /tomcat6/lib
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject: RE: JAX-WS, Mail and Activation  PostPosted: Jul 22, 2008 - 05:49 PM
Moderator
Moderator


Joined: Jan 06, 2004
Posts: 23305

Frank thanks for posting your solution for Tomcat.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits