facebook

activation.jar being overridden by javaee.jar in plugin

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #288685 Reply

    bev
    Member

    I have a JUnit test which tries to send an email using the Spring org.springframework.mail.javamail.JavaMailSenderImpl class.

    When run from inside Eclipse, I receive a NoClassDefFoundError because it is unable to find com.sun.activation.registries.LogSupport. I have activation-1.1.jar on my build path but this is being ignored and overriden by javaee.jar in the com.genuitec.eclipse.j2eedt.core-5.5.0\data\libraryset\EE_5 directory.

    I can run the test successfully outside Eclipse where I can control which jars are on the classpath and it works fine with the activation-1.1.jar which is in the project’s lib.

    I can run the test successfully from within Eclipse if I rename the javaee.jar, but I can’t do this as a long term fix because this stops the project building.

    How can I persuade Eclipse/MyEclipse to use the activation-1.1.jar instead of the version in the plugin?

    I’m using MyEclipse 5.5.0.

    #288721 Reply

    Loyal Water
    Member

    If you right click on your Project and go to Build Path > Configure Build Path > Java Build Path > Order and Export and move the activation-1.1.jar up the list, does it help?

    #288734 Reply

    bev
    Member

    Thanks for the suggestion, but unfortunately this doesn’t work because what seems to be picking up the javaee.jar is the MYECLIPSE_LIB_HOME variable which can be seen by going to Window|Preferences|Java|Build Path|Classpath Variables.

    I assume that these take effect before the individual project library files are loaded and I haven’t been able to find a way of indicating that a project file should take priority.

    I’ve looked at a colleague’s later version of MyEclipse (6.0) and it doesn’t look like an upgrade would solve the problem as the javaee.jar is still missing the LogSupport file so I’m not sure what I can do to fix the problem.

    Any further suggestions would be very welcome.

    #288790 Reply

    Loyal Water
    Member

    I did some research on this issue and it seems like people have faced similar issues in the past. You should go through this thread since it throws some light on this issue:-
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=45&t=002005

    #288815 Reply

    bev
    Member

    Thanks for the information. The issue is now resolved by removing the JavaEE Libraries from the Bootstrap entres in the classpath shown in the JUnit Run Configuration tab.

    #288826 Reply

    Loyal Water
    Member

    Your welcome.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: activation.jar being overridden by javaee.jar in plugin

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