facebook

JAX-WS, Mail and Activation

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #286842 Reply

    frankc01a
    Member

    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

    #286848 Reply

    Loyal Water
    Member

    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.

    #286879 Reply

    frankc01a
    Member

    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.

    #286996 Reply

    frankc01a
    Member

    Anything?

    #287110 Reply

    Riyad Kalla
    Member

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

    #287120 Reply

    frankc01a
    Member

    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!!!!

    #287170 Reply

    frankc01a
    Member

    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

    #287212 Reply

    frankc01a
    Member

    Hello?

    #287222 Reply

    Riyad Kalla
    Member

    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.

    #287259 Reply

    frankc01a
    Member

    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?

    #287308 Reply

    frankc01a
    Member

    Solution:

    Deploy JAX-WS distribution libraries to /tomcat6/lib

    #287392 Reply

    Riyad Kalla
    Member

    Frank thanks for posting your solution for Tomcat.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: JAX-WS, Mail and Activation

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in