- This topic has 5 replies, 2 voices, and was last updated 16 years, 8 months ago by
Loyal Water.
-
AuthorPosts
-
bevMemberI 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.
Loyal WaterMemberIf 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?
bevMemberThanks 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.
Loyal WaterMemberI 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
bevMemberThanks 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.
Loyal WaterMemberYour welcome.
-
AuthorPosts