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

Andreas Wiesinger edited comment on CXFXJC-34 at 2/7/22, 11:55 AM:
-------------------------------------------------------------------

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 any of these versions have already been merged, it would be nice to document 
it here and close the ticket.

EDIT: The 
[fix|https://github.com/eclipse-ee4j/jaxb-ri/commit/0042068395f720bbe368762832e33ede1141f67a]
 mentioned in the previous comment was modified again in [this 
commit|https://github.com/eclipse-ee4j/jaxb-ri/commit/a434238dfb488d33bc3bb0e4cd32436a3abc6dac#diff-90b905c31fb67b2729334ee318901809e9bcfbe117b929c5190c3e723fd1e94dL247]
 but still seems to be the same outcome and should fix the issue. This code is 
included since [version 
2.3.3|https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.3-RI/jaxb-ri/xjc/pom.xml]
 of jaxb.

EDIT 2: [Commit 
ea3f55273|https://github.com/apache/cxf/commit/ea3f552731ee18374a9deb6d3a05485c94fc70ed#diff-b5a06276719e759fe07dfe6f75d781be5f83d2215179d82bdb195ad035348214R145]
 of the CXF repo shows that this jaxb version was set to 2.3.3 and remains the 
current version up to [CXF 
3.5.0|https://github.com/apache/cxf/blob/cxf-3.5.0/parent/pom.xml].


was (Author: JIRAUSER284786):
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 any of these versions have already been merged, it would be nice to document 
it here and close the ticket.

EDIT: The 
[fix|https://github.com/eclipse-ee4j/jaxb-ri/commit/0042068395f720bbe368762832e33ede1141f67a]
 mentioned in the previous comment was modified again in [this 
commit|https://github.com/eclipse-ee4j/jaxb-ri/commit/a434238dfb488d33bc3bb0e4cd32436a3abc6dac#diff-90b905c31fb67b2729334ee318901809e9bcfbe117b929c5190c3e723fd1e94dL247]
 but still seems to be the same outcome and should fix the issue. This code is 
included since [version 
2.3.3|https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.3-RI/jaxb-ri/xjc/pom.xml]
 of jaxb.

EDIT 2: [Commit 
19883149#L144|https://github.com/apache/cxf/blob/19883149c657a6ddd9b1a8cdcbcc5fc353d3d744/parent/pom.xml#L144]
 of the CXF repo shows that this jaxb version was set to 2.3.3 and remains the 
current version up to [CXF 
3.5.0|https://github.com/apache/cxf/blob/cxf-3.5.0/parent/pom.xml].

> 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