cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7517) Codegen fails when using JDK9 with maven and cxf-plugin
Date Sun, 22 Oct 2017 03:52:00 GMT

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

John D. Ament commented on CXF-7517:
------------------------------------

It may be easier to just declare the dependencies needed, it avoids having to rely on the
system behavior.  I created a simple project w/ CXF + CDI, had it fail with java 9, added
these dependencies and it works:

{code}
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
        </dependency>
{code}

Maybe it will work for you?  Maybe we want to add these to cxf-core as dependencies? (activation
may not be needed, it may be from CDI)

> Codegen fails when using JDK9 with maven and cxf-plugin
> -------------------------------------------------------
>
>                 Key: CXF-7517
>                 URL: https://issues.apache.org/jira/browse/CXF-7517
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 3.1.12
>            Reporter: David J. M. Karlsen
>            Assignee: Freeman Fang
>              Labels: jdk9
>
> I get this stack trace when trying to generate code with the cxf-codegen-plugin:
> {noformat}
> [INFO] --- cxf-codegen-plugin:3.1.12:wsdl2java (default) @ jfr-srv-schemas ---
> [INFO] Using proxy server configured in maven.
> [INFO] Running code generation in fork mode...
> [INFO] The java executable is /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/java
> [INFO] Building jar: /var/folders/c7/18m1hlzs075_z0f5nfnt44jm0000gn/T/cxf-tmp-3400635706757982781/cxf-codegen16491176446297681426.jar
> [WARNING] WARNING: An illegal reflective access operation has occurred
> [WARNING] WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector
(file:/Users/et2448/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.11/jaxb-impl-2.2.11.jar)
to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
> [WARNING] WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
> [WARNING] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective
access operations
> [WARNING] WARNING: All illegal access operations will be denied in a future release
> [WARNING] Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/ws/Service
> [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.isJaxws22(JAXWSContainer.java:64)
> [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.getServiceTarget(JAXWSContainer.java:61)
> [WARNING]       at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:68)
> [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:175)
> [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
> [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:415)
> [WARNING]       at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
> [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> [WARNING]       at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> [WARNING]       at org.apache.cxf.maven_plugin.wsdl2java.ForkOnceWSDL2Java.main(ForkOnceWSDL2Java.java:51)
> [WARNING] Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Service
> [WARNING]       at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
> [WARNING]       at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
> [WARNING]       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
> [WARNING]       ... 10 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message