You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2024/03/22 15:44:00 UTC

[jira] [Commented] (CXF-8990) Cxf plugins (codegen, xjc): fails in versions 4.0.4, 4.0.1

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

Freeman Yue Fang commented on CXF-8990:
---------------------------------------

Hi [~jondruse],

Please notice this warning in your build
{code}
[WARNING] Exception in thread "main" org.apache.cxf.tools.common.ToolException: Not a valid jaxb or jaxws binding file, please check the namespace
 {code}

This means the namespace in the jaxb or jaxws binding file of your build isn't correctly. More specifically, you should use something like (JEE9+ jakarta namespace)
{code}
xmlns:jaxws="https://jakarta.ee/xml/ns/jaxws"
xmlns:jxb="https://jakarta.ee/xml/ns/jaxb"
{code}
instead of 
{code}
xmlns:jaxws="https://java.sun.com/xml/ns/jaxws"
xmlns:jxb="https://java.sun.com/xml/ns/jaxb"
{code}

Cheers
Freeman

> Cxf plugins (codegen, xjc): fails in versions 4.0.4, 4.0.1 
> -----------------------------------------------------------
>
>                 Key: CXF-8990
>                 URL: https://issues.apache.org/jira/browse/CXF-8990
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Jiri Ondrusek
>            Priority: Major
>
> I was building Camel right after the upgrade of plugins (cxf-codegen to 4.0.4 and cxf-xjc to 4.0.1) See [https://github.com/apache/camel/commit/a1bc751d7d8f5fb2016ed54e0735de5e4e9ec18b]
>  
> The build failed with:
> {code:java}
> [INFO] --------------------< org.apache.camel:camel-itest >--------------------
> [INFO] Building Camel :: Integration Tests 4.5.0-SNAPSHOT             [557/559]
> [INFO]   from tests/camel-itest/pom.xml
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO] 
> [INFO] --- clean:3.3.2:clean (default-clean) @ camel-itest ---
> [INFO] Deleting /home/jondruse/git/community/camel/tests/camel-itest/target
> [INFO] 
> [INFO] --- cxf-codegen:4.0.4:wsdl2java (generate-test-sources) @ camel-itest ---
> [INFO] Running code generation in fork mode...
> [INFO] The java executable is /home/jondruse/.sdkman/candidates/java/17.0.9-tem/bin/java
> [INFO] Building jar: /tmp/cxf-tmp-14372731791450387841/cxf-codegen4454546328799244847.jar
> [WARNING] Exception in thread "main" org.apache.cxf.tools.common.ToolException: Not a valid jaxb or jaxws binding file, please check the namespace
>  {code}
> {code:java}
> ...
> ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:4.0.4:wsdl2java (generate-test-sources) on project camel-itest: 
> [ERROR] Exit code: 1
> [ERROR] Command line was: /home/jondruse/.sdkman/candidates/java/17.0.9-tem/bin/java --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED -jar /tmp/cxf-tmp-14372731791450387841/cxf-codegen4454546328799244847.jar /tmp/cxf-tmp-14372731791450387841/cxf-w2j15211708284601236974args
> {code}
> Issue can be simulated by building of Camel from this commit: https://github.com/apache/camel/commit/a1bc751d7d8f5fb2016ed54e0735de5e4e9ec18b



--
This message was sent by Atlassian Jira
(v8.20.10#820010)