- This topic has 5 replies, 2 voices, and was last updated 12 years, 5 months ago by support-swapna.
-
AuthorPosts
-
Clayton E. CramerMemberWe have been running JUnit for a year or more now, no problems. Suddenly, with no apparent change in instalation, we are getting a complaint part way through a particular unit test:
Class File Editor
Source not found
The JAR file junit.jar has no source attachment.
You can attach the source by clikcing Attach Source button below:It looks like something in TestCase.class is blowing up, but it isn’t clear what. My guess is that the TestCase class is having an exception of some sort, but I’m not sure how to fix this.
support-swapnaModeratorclaytoncramer ,
Sorry that you are seeing this issue.
Can you give us some more information ?
1. Can you please copy paste the Installation Details from MyEclipse > Installation Summary > Installation Details ?
2. Did this particular unit test work fine before?
3. Is there a source attachment for junit.jar? If not can you try attaching it and see if the issue resolves?
4. Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log, replicate the issue and check the .log file for any errors of interest. Please paste the contents of the .log file here for us.
Clayton E. CramerMemberInstallation summary:
*** Date: Friday, June 22, 2012 8:40:57 AM MDT ** System properties: OS=WindowsXP OS version=5.1.0 Java version=1.6.0_13 *** MyEclipse details: MyEclipse Enterprise Workbench Version: 9.1 Build id: 9.1-20110701 *** Eclipse details: MyEclipse Enterprise Workbench Version: 9.1 Build id: 9.1-20110701 Eclipse startup command=-os win32 -ws win32 -arch x86 -showsplash -launcher C:\Program Files\MyEclipse\MyEclipse 9\myeclipse.exe -name Myeclipse --launcher.library C:\Program Files\MyEclipse\MyEclipse 9\../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_3.2.0.v201103301700\eclipse_3215.dll -startup C:\Program Files\MyEclipse\MyEclipse 9\../Common/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -install C:\Program Files\MyEclipse\MyEclipse 9 -configuration C:\Program Files\MyEclipse\MyEclipse 9\configuration -vm C:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll
The unit test worked fine before. Here is the stack trace:
java.lang.NoSuchMethodError: junit.framework.ComparisonFailure.getExpected()Ljava/lang/String; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestListener.testFailure(JUnit4TestListener.java:63) at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:100) at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:41) at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:97) at org.junit.internal.runners.JUnit38ClassRunner$OldTestClassAdaptingListener.addError(JUnit38ClassRunner.java:41) at org.junit.internal.runners.JUnit38ClassRunner$OldTestClassAdaptingListener.addFailure(JUnit38ClassRunner.java:64) at junit.framework.TestResult.addFailure(TestResult.java:46) at junit.framework.TestResult.runProtected(TestResult.java:127) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
When I attempt to attach the jar file, I get a complaint: “The source attachment does not contain the source file for the file TestCase.class.”
support-swapnaModeratorclaytoncramer,
Thank you for the details. This looks more like a JUnit issue.
Can you please take a look at this link and try their suggestions? :
I suggest you cross post to development forums too for better support.
Let us know how it works for you.
Clayton E. CramerMemberThanks!
support-swapnaModeratorclaytoncramer,
Glad that the issue is fixed.
Let us know if you see any issues. -
AuthorPosts