Community
Participate
Working Groups
From: https://download.eclipse.org/eclipse/downloads/drops4/I20210707-1800/testresults/html/org.eclipse.jdt.compiler.tool.tests_ep421I-unit-win32-java11_win32.win32.x86_64_11.html test002_dash_d_option - 1.6 Failure Unexpected problems [out: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.util.JRTUtil.walkModuleImage(JRTUtil.java:173) at org.eclipse.jdt.internal.compiler.batch.ClasspathJrt.loadModules(ClasspathJrt.java:206) at org.eclipse.jdt.internal.compiler.batch.ClasspathJrt.initialize(ClasspathJrt.java:193) at org.eclipse.jdt.internal.compiler.batch.ClasspathJsr199.initialize(ClasspathJsr199.java:160) at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:222) at org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3531) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4750) at org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl.call(EclipseCompilerImpl.java:99) at org.eclipse.jdt.internal.compiler.tool.EclipseCompiler$1.call(EclipseCompiler.java:196) at org.eclipse.jdt.compiler.tool.tests.AbstractCompilerToolTest.invokeCompiler(AbstractCompilerToolTest.java:118) at org.eclipse.jdt.core.tests.compiler.regression.AbstractBatchCompilerTest.runTest(AbstractBatchCompilerTest.java:599) at org.eclipse.jdt.compiler.tool.tests.CompilerInvocationTests.runTest(CompilerInvocationTests.java:100) at org.eclipse.jdt.compiler.tool.tests.CompilerInvocationTests.test002_dash_d_option(CompilerInvocationTests.java:358) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at junit.framework.TestCase.runTest(TestCase.java:177) at org.eclipse.jdt.core.tests.junit.extension.TestCase.runTest(TestCase.java:969) at junit.framework.TestCase.runBare(TestCase.java:142) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:130) at junit.framework.TestSuite.runTest(TestSuite.java:241) at junit.framework.TestSuite.run(TestSuite.java:236) at org.eclipse.jdt.core.tests.util.CompilerTestSetup.run(CompilerTestSetup.java:59) at junit.framework.TestSuite.runTest(TestSuite.java:241) at junit.framework.TestSuite.run(TestSuite.java:236) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:43) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:82) at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:73) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75) at org.eclipse.test.EclipseTestRunner.runTests(EclipseTestRunner.java:226) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:202) at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:52) at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:35) at org.eclipse.test.CoreTestApplication.start(CoreTestApplication.java:43) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) at org.eclipse.equinox.launcher.Main.main(Main.java:1435) at org.eclipse.core.launcher.Main.main(Main.java:44) ][err: org.eclipse.jdt.internal.compiler.tool.ExceptionDiagnostic@6aea99e7 ] junit.framework.AssertionFailedError: Unexpected problems [out: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.util.JRTUtil.walkModuleImage(JRTUtil.java:173) at org.eclipse.jdt.internal.compiler.batch.ClasspathJrt.loadModules(ClasspathJrt.java:206) at org.eclipse.jdt.internal.compiler.batch.ClasspathJrt.initialize(ClasspathJrt.java:193) at org.eclipse.jdt.internal.compiler.batch.ClasspathJsr199.initialize(ClasspathJsr199.java:160) at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:222) at org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3531) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4750) at org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl.call(EclipseCompilerImpl.java:99) at org.eclipse.jdt.internal.compiler.tool.EclipseCompiler$1.call(EclipseCompiler.java:196) at org.eclipse.jdt.compiler.tool.tests.AbstractCompilerToolTest.invokeCompiler(AbstractCompilerToolTest.java:118) at org.eclipse.jdt.core.tests.compiler.regression.AbstractBatchCompilerTest.runTest(AbstractBatchCompilerTest.java:599) at org.eclipse.jdt.compiler.tool.tests.CompilerInvocationTests.runTest(CompilerInvocationTests.java:100) at org.eclipse.jdt.compiler.tool.tests.CompilerInvocationTests.test002_dash_d_option(CompilerInvocationTests.java:358) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at junit.framework.TestCase.runTest(TestCase.java:177) at org.eclipse.jdt.core.tests.junit.extension.TestCase.runTest(TestCase.java:969) at junit.framework.TestCase.runBare(TestCase.java:142) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:130) at junit.framework.TestSuite.runTest(TestSuite.java:241)
This doesn't fail locally. It appears a wrong file path somehow makes its way? Andrey, do you have some idea what might be going on?
(In reply to Jay Arthanareeswaran from comment #1) > This doesn't fail locally. It appears a wrong file path somehow makes its > way? > > Andrey, do you have some idea what might be going on? I noticed, this is only ever failed on Windows machine, but consistently - could be related to concrete JDK/JRE installation (path with spaces, wrong JRE, Windows path separator, content of Windows specific JDK build installation)?
org.eclipse.jdt.internal.compiler.util.JrtFileSystem.JrtFileSystem(File) is initialized with C:\Program Files\Java\jdk-11\lib\modules, and because of that, org.eclipse.jdt.internal.compiler.util.JrtFileSystem.initialize(File) can't properly find the jrt-fs.jar: it resolves it to file:/C:/Program%20Files/Java/jdk-11/lib/modules/lib/jrt-fs.jar The "wrong" path is coming from this code: locationFiles = standardJavaFileManager.getLocation(StandardLocation.PLATFORM_CLASS_PATH); in org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl.handleLocations() and is related to bug 574181 changes. The location C:\Program Files\Java\jdk-11\lib\modules is resolved in com.sun.tools.javac.file.Locations.BootClassPathLocationHandler.getPaths(). I haven't checked yet, what will be returned on Linux. I will push possible workaround on Windows, but I honestly have no idea what is expected from standardJavaFileManager.getLocation(StandardLocation.PLATFORM_CLASS_PATH);
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182928
(In reply to Andrey Loskutov from comment #3) > org.eclipse.jdt.internal.compiler.util.JrtFileSystem.JrtFileSystem(File) is > initialized with C:\Program Files\Java\jdk-11\lib\modules, and because of > that, org.eclipse.jdt.internal.compiler.util.JrtFileSystem.initialize(File) > can't properly find the jrt-fs.jar: it resolves it to > file:/C:/Program%20Files/Java/jdk-11/lib/modules/lib/jrt-fs.jar I see that, eventually, the platform libraries are computed/returned by org.eclipse.jdt.internal.compiler.util.Util.collectPlatformLibraries(File) which could simply mean we are not getting the right value from java.home. But then why only this test is something I don't know.
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182928 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=d4d1518755e0dabbf5e446adb4e4a0c1a3202705
(In reply to Eclipse Genie from comment #6) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/182928 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=d4d1518755e0dabbf5e446adb4e4a0c1a3202705 @Jay: I've managed to push that to both Gerrit & at same time merge that to the master branch somehow, without even approving on gerrit. I hope you don't mind, the patch should fix the problem now. If you are not OK with that, feel free to revert.
Looks good in https://download.eclipse.org/eclipse/downloads/drops4/I20210724-1800/testResults.php
(In reply to Andrey Loskutov from comment #7) > @Jay: I've managed to push that to both Gerrit & at same time merge that to > the master branch somehow, without even approving on gerrit. I hope you > don't mind, the patch should fix the problem now. Not at all. Thanks for taking care of this!
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183375
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/183375 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0bfd2bfeaa2c2165c0cebe570d6bfdb416aff602
Verified for 4.21 M3 using build I20210818-1800