Wsimport failing in Java 11
Asked Answered
H

2

6

In Java 8, I was using codehaus' jaxws-maven-plugin version 2.5 for wsimport goal in maven. Now I am moving my application to Java 11 and the plugin execution gives error.

<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<versionRange>2.5</versionRange>

I found one workaround and used the following which resolved the error in Java 11 - :

<plugin>
    <groupId>com.helger.maven</groupId>
    <artifactId>jaxws-maven-plugin</artifactId>
    <version>2.6</version>
        <executions>
            <execution>
                <goals>
                    <goal>wsimport</goal>
                </goals>
                <configuration>
                    <vmArgs>
                        <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
                    </vmArgs>

I believe codehaus has not yet updated its plugin to provide support for Java11. Is my approach a right one, or is there any alternative?

Herniorrhaphy answered 28/11, 2018 at 9:14 Comment(4)
What error do you see? The tool wsimport is no more available with JDK11Strong
@nullpointer I am seeing following error : [ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.5:wsimport (default) on project: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check outputHerniorrhaphy
Already reported to jaxws-maven-plugin issues - github.com/mojohaus/jaxws-maven-plugin/issues/66 . You can give a workaround a try and provide the feedback github.com/phax/jaxws-maven-plugin#mojohaus-jax-ws-maven-pluginStrong
Thank you. I have use the same workaround which seems to work fine right now.Herniorrhaphy
H
12

I solved the issue by using the following plugin

<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
    <version>2.6</version>

Update : New plugin is available which can be used for this purpose. Apparently com.helger plugin was just a temporary workaround.

<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
    <version>2.3.2</version>
Herniorrhaphy answered 3/1, 2019 at 10:2 Comment(0)
C
0

I have recently migrated to OpenJdk 12 and I also got some problem generating java code from a WSDL. I solved the issue by using the reference implementation of JAX-WS. This is mentioned in the following source JEP 320: Remove the Java EE and CORBA Modules, (which has also been linked by @Naman in this thread).

I solved the issue by using the maven artifact com.sun.xml.ws:jaxws-ri

Comedietta answered 7/7, 2019 at 14:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.