Ruud de Jong created CXFXJC-34:
----------------------------------
Summary: Code generation breaks on boolean restricted to 0 or 1
Key: CXFXJC-34
URL: https://issues.apache.org/jira/browse/CXFXJC-34
Project: CXF XJC Utils
Issue Type: Bug
Components: Maven Plugin
Affects Versions: 3.3.0
Reporter: Ruud de Jong
Exception in thread "main" java.lang.InternalError: Unable to load source code
of com.sun.tools.xjc.runtime.ZeroOneBooleanAdapter as a resource
at
com.sun.codemodel.fmt.JStaticJavaFile$ResourceLoader.getResourceAsStream(JStaticJavaFile.java:234)
at com.sun.codemodel.fmt.JStaticJavaFile.build(JStaticJavaFile.java:84)
at com.sun.codemodel.JPackage.build(JPackage.java:446)
at com.sun.codemodel.JCodeModel.build(JCodeModel.java:327)
at com.sun.codemodel.JCodeModel.build(JCodeModel.java:317)
at org.apache.cxf.maven_plugin.XSDToJavaRunner.run(XSDToJavaRunner.java:226)
at
org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.run(AbstractXSDToJavaMojo.java:368)
at
org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:276)
at org.apache.cxf.maven_plugin.XSDToJavaMojo.execute(XSDToJavaMojo.java:41)
This happens in 3.3.0 (not in 3.2.3).
The XSD uses this definition:
<xs:attribute name="mustUnderstand" >
<xs:simpleType>
<xs:restriction base='xs:boolean'>
<xs:pattern value='0|1' />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
which triggers a special piece of code within JCodeModel of jaxb-xjc and tries
to copy some Java source file from classpath.
Apparently, this has changed from 3.2.3 to 3.3.0 and does not work properly
anymore within the Maven plugin scope.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)