JDK-8071968 : javax/xml/ws/8046817/GenerateEnumSchema.java failed on Windows platform
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxb
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,windows
  • Submitted: 2015-01-30
  • Updated: 2017-03-20
  • Resolved: 2015-04-17
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 b61Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Failed with the following messages:
#section:main
----------messages:(3/134)----------
command: main GenerateEnumSchema
reason: User specified action: run main/othervm GenerateEnumSchema 
elapsed time (seconds): 0.865
----------System.out:(37/2543)*----------
Call to schemagen: D:\\Users\\aurora\\CommonData\\jdk\\bin\\schemagen.exe TestClassType.java
Jan 28, 2015 8:55:07 PM com.sun.tools.internal.jxc.SchemaGenerator run
SEVERE: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.tools.internal.jxc.SchemaGenerator.run(SchemaGenerator.java:151)
at com.sun.tools.internal.jxc.SchemaGenerator.run(SchemaGenerator.java:76)
at com.sun.tools.internal.jxc.SchemaGenerator.main(SchemaGenerator.java:67)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/Users/aurora/CommonData/jdk/lib/modules/appmodules.jimage
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at java.nio.file.Paths.get(Paths.java:84)
at com.sun.tools.javac.file.Locations.getPathEntries(Locations.java:169)
at com.sun.tools.javac.file.Locations.access$300(Locations.java:87)
at com.sun.tools.javac.file.Locations$SearchPath.addFiles(Locations.java:238)
at com.sun.tools.javac.file.Locations$SearchPath.addFiles(Locations.java:244)
at com.sun.tools.javac.file.Locations$SimpleLocationHandler.handleOption(Locations.java:448)
at com.sun.tools.javac.file.Locations.handleOption(Locations.java:743)
at com.sun.tools.javac.util.BaseFileManager.handleOption(BaseFileManager.java:210)
at com.sun.tools.javac.util.BaseFileManager$1.handleFileManagerOption(BaseFileManager.java:168)
at com.sun.tools.javac.main.Option.process(Option.java:672)
at com.sun.tools.javac.main.Option$6.process(Option.java:157)
at com.sun.tools.javac.util.BaseFileManager.handleOption(BaseFileManager.java:176)
at com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:297)
at com.sun.tools.javac.main.Arguments.init(Arguments.java:229)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:166)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:108)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:64)
at com.sun.tools.internal.jxc.SchemaGenerator$Runner.compile(SchemaGenerator.java:235)
... 7 more

----------System.err:(14/795)----------
java.lang.RuntimeException: schemagen failed
	at GenerateEnumSchema.runSchemaGen(GenerateEnumSchema.java:126)
	at GenerateEnumSchema.main(GenerateEnumSchema.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.lang.RuntimeException: schemagen failed
JavaTest Message: shutting down test


I didn't investigate the code, but the exception java.nio.file.InvalidPathException: Illegal char <:> at index 2: /D:/Users/aurora/CommonData/jdk/lib/modules/appmodules.jimage
is because "/D:/Users..." is not a valid file name for method Paths.get, the first "/" should be removed.
Comments
Reopening this report, because test needs to be excluded from ProblemList
10-04-2015

Schemagen was fixed to address this issue in standalone JAXB project and was integrated to JDK9 as part of JDK-8076549.
10-04-2015

This failure may not be the test code defect, but be jxc issue. Because GenerateEnumSchema.java is introduced by JDK-8046817, I assigned to Aleksej.
30-01-2015

RULE javax/xml/ws/8046817/GenerateEnumSchema.java Exception java.lang.RuntimeException: schemagen failed
30-01-2015