[ 
https://issues.apache.org/jira/browse/CXFXJC-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17487947#comment-17487947
 ] 

Andreas Wiesinger commented on CXFXJC-34:
-----------------------------------------

Any updates on this?

There is already a [jaxb 3.0.0 Release 
available|https://github.com/eclipse-ee4j/jaxb-ri/releases] and even internal 
[4.0.0 Tags|https://github.com/eclipse-ee4j/jaxb-ri/tags] as far as I 
understand it.

If the any of these versions is already merged, it would be nice to document it 
here and close the ticket.

> 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
>            Assignee: Freeman Yue Fang
>            Priority: Major
>
> 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
(v8.20.1#820001)

Reply via email to