Community
Participate
Working Groups
Created attachment 270925 [details] issue revealing projects Version: Oxygen.1a (4.7.1a) Build id: M20171009-0410 There seems to be another issue with JUnit-Test execution as fixed in #522395. If JUnit libraries are provided by other project via project dependency JUnit-Test execution fails with stack trace see below. How to reproduce: 1) import provided projects (see attachment) 2) right click on class 'MyClassTest' and select 'Run as...' -> 'JUnit-Test' from the context menu java.lang.NoClassDefFoundError: org/junit/runner/manipulation/Filter at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:292) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadTestLoaderClass(RemoteTestRunner.java:378) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:368) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:363) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:307) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:222) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206) Caused by: java.lang.ClassNotFoundException: org.junit.runner.manipulation.Filter at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) ... 8 more
org.eclipse.jdt.core.IJavaProject.getResolvedClasspath(boolean) does not return the junit jars so it is not added in the classpath.
As interim workaround (till 4.7.2 is release in December) the required libraries can be added to the classpath (UserEntries) of the JUnit launch configuration manually.
New Gerrit change created: https://git.eclipse.org/r/111110
As we have workaround, making normal. Targeting for 4.8 M4 and 4.7.3
(In reply to Sarika Sinha from comment #4) > As we have workaround, making normal. > Targeting for 4.8 M4 and 4.7.3 Yes, there is a workaround, but it is really a pain to add required dependencies to every test launch configuration manually. In addition there seems to be a fix. Why doesn't it make it to the version 4.7.2?
We don't have the fix in I build yet, and without much testing, to put it in 4.7.2 might cause problems.
Thanks for targeting to 4.7.2 again. Even though I don't know the manual testing steps required to be accomplished I can offer to help testing here. Do you have automatic UI-Tests (SWT-Bot) - propably this would be the most easy path to follow for automation of these kinds of tests.
Gerrit change https://git.eclipse.org/r/111110 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=ac69015eecc0fcd0b9edf0b818ea8a7282c9964c
I have merged the changes to master, you can test in the next I build.
FYI, the problem is still present on recent oxygen maintenance build: Version: Oxygen.2 (4.7.2) Build id: M20171108-1700
(In reply to Claus Klammer from comment #10) > FYI, the problem is still present on recent oxygen maintenance build: > > Version: Oxygen.2 (4.7.2) > Build id: M20171108-1700 It has not been fixed in Oxygen builds, it has been fixed in I builds - Photon.
(In reply to Sarika Sinha from comment #11) > (In reply to Claus Klammer from comment #10) > > FYI, the problem is still present on recent oxygen maintenance build: > > > > Version: Oxygen.2 (4.7.2) > > Build id: M20171108-1700 > > It has not been fixed in Oxygen builds, it has been fixed in I builds - > Photon. Thanks for the hint: I can confirm that the issue is resolved in Photon build: Version: 4.8.0.v20171111-1500 Build id: I20171111-1500 Looking forward to oxygen backport or merge ;-)
New Gerrit change created: https://git.eclipse.org/r/111517
New Gerrit change created: https://git.eclipse.org/r/111518
Gerrit change https://git.eclipse.org/r/111517 was merged to [R4_7_maintenance]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=7e3f25027f9edae0db3300455d5f68b5ac64c836
Gerrit change https://git.eclipse.org/r/111518 was merged to [R4_7_maintenance]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=dea7670ec43f75f7acf5e1bccd3650ff1ef81b89
Released to 4.7.2 .
Verified in Eclipse SDK Version: Oxygen.2 (4.7.2) Build id: M20171114-1700
Looks like the issue still remains in module mode - using 4.7.2 RC3
(In reply to Wolfgang Zitzelsberger from comment #19) > Looks like the issue still remains in module mode - using 4.7.2 RC3 Junit tests are not working in modular project right now , see Bug 525948.