JDK-8171412 : tools/javac/modules/AddLimitMods.java failed with "error: module not found"
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 9
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-12-19
  • Updated: 2017-01-03
  • Resolved: 2016-12-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b150Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
ompiling/processing m2x files:
[DIRECT]:
testRuntime2Compile/18/m2x/module-info.java:1: error: module not found: m1x
module m2x { requires m1x; exports test; }
^
1 error

test: testAllModulePath
[DIRECT]:
testAllModulePath/cp-src/test/Test.java:1: error: package api does not exist
package test; public class Test { api.Api api; }
                                     ^
1 error
[DIRECT]:
error: module not found: jdk.aot
error: module not found: jdk.vm.compiler
2 errors
Exception running test testAllModulePath: toolbox.Task$TaskError: Task javac failed: rc=1
toolbox.Task$TaskError: Task javac failed: rc=1
	at toolbox.AbstractTask.checkExit(AbstractTask.java:112)
	at toolbox.JavacTask.run(JavacTask.java:303)
	at AddLimitMods.testAllModulePath(AddLimitMods.java:272)
	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:538)
	at toolbox.TestRunner.runTests(TestRunner.java:89)
	at ModuleTestBase.runTests(ModuleTestBase.java:50)
	at AddLimitMods.main(AddLimitMods.java:78)
	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:538)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
	at java.base/java.lang.Thread.run(Thread.java:844)

test: testObservableForUnnamed
running variant: options=[], expected log: Test.java:2:18: compiler.err.doesnt.exist: javax.annotation
Test.java:5:19: compiler.err.doesnt.exist: javax.xml.bind
2 errors

[DIRECT]:
Test.java:2:18: compiler.err.doesnt.exist: javax.annotation
Test.java:5:19: compiler.err.doesnt.exist: javax.xml.bind
2 errors
running variant: options=[--add-modules, java.annotations.common,java.xml.bind], expected log: null
running variant: options=[--limit-modules, java.xml.ws,jdk.compiler], expected log: null
running variant: options=[--add-modules, ALL-SYSTEM], expected log: null

test: testManual
[DIRECT]:
testManual/module-src/m1x/module-info.java:1: error: module not found: m2x
module m1x { requires m2x; requires m3x; }
^
1 error
[DIRECT]:
testManual/module-src/m1x/module-info.java:1: error: module not found: m3x
module m1x { requires m2x; requires m3x; }
^
1 error
[DIRECT]:
testManual/module-src/m1x/module-info.java:1: error: module not found: m2x
module m1x { requires m2x; requires m3x; }
^
1 error

4 tests, 1 errors
java.lang.Exception: 1 errors found
	at toolbox.TestRunner.runTests(TestRunner.java:116)
	at ModuleTestBase.runTests(ModuleTestBase.java:50)
	at AddLimitMods.main(AddLimitMods.java:78)
	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:538)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
	at java.base/java.lang.Thread.run(Thread.java:844)
Comments
Review: http://mail.openjdk.java.net/pipermail/compiler-dev/2016-December/010618.html Webrev: http://cr.openjdk.java.net/~jjg/8171412/webrev.00/
20-12-2016

For this specific issue, JDK-8171412, tools/javac/modules/AddLimitMods.java failed with "error: module not found" The problem was a latent bug in javac that was uncovered by the Hotspot update. Because of the HotSpot update, we now have system images with qualified exports to possibly-nonexistent modules. (I'll comment on the javadoc test failures in JDK-8171413.)
20-12-2016

Again (ref 8171413) this seems more likely to be a problem with the module system refresh than the hotspot integration. While the second pair of errors: [DIRECT]: error: module not found: jdk.aot error: module not found: jdk.vm.compiler 2 errors could indicate an with aot, the first set seem purely test related: [DIRECT]: testRuntime2Compile/18/m2x/module-info.java:1: error: module not found: m1x module m2x { requires m1x; exports test; } ^ 1 error test: testAllModulePath [DIRECT]: testAllModulePath/cp-src/test/Test.java:1: error: package api does not exist package test; public class Test { api.Api api; } ^ 1 error
19-12-2016

We need an assignee and verification if this is still a p3 and corresponding course of action
19-12-2016