MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
claytoncramer
Post subject: JUnit complaint: no junit.jar source  PostPosted: Jun 21, 2012 - 06:16 PM



Joined: Nov 18, 2010
Posts: 44

We 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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jun 22, 2012 - 07:38 AM



Joined: Nov 11, 2010
Posts: 2499

claytoncramer ,

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
claytoncramer
Post subject:   PostPosted: Jun 22, 2012 - 03:46 PM



Joined: Nov 18, 2010
Posts: 44

Installation summary:


Code:
*** 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:

Code:
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."
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jun 25, 2012 - 06:58 AM



Joined: Nov 11, 2010
Posts: 2499

claytoncramer,

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? :

http://stackoverflow.com/questions/4019016/junit-java-lang-nosuchmethoderror-junit-framework-comparisonfailure-getexpected

I suggest you cross post to development forums too for better support.

Let us know how it works for you.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
claytoncramer
Post subject: JUnit 3.8.2 fixed this  PostPosted: Jun 25, 2012 - 06:59 PM



Joined: Nov 18, 2010
Posts: 44

Thanks!
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jun 26, 2012 - 05:17 AM



Joined: Nov 11, 2010
Posts: 2499

claytoncramer,

Glad that the issue is fixed.
Let us know if you see any issues.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   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