Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org.apache.maven.plugin.MojoExecutionException: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output #66

Open
RangaSamudrala opened this issue Jul 25, 2018 · 4 comments

Comments

@RangaSamudrala
Copy link

Issue# 4 says the above mentioned error has been fixed and the issue is closed. But, I see the same error. Please note that I am trying to compile with OpenJDK v11.

Plugin specification is:

.

                 <dependency>
		   <groupId>com.sun.xml.ws</groupId>
		   <artifactId>jaxws-rt</artifactId>
		   <version>2.3.0.2</version>
	      </dependency>

		<plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>jaxws-maven-plugin</artifactId>
			<version>2.4.1</version>
			<dependencies>
				<dependency>
					<groupId>com.sun.xml.ws</groupId>
					<artifactId>jaxws-tools</artifactId>
					<version>2.3.0.2</version>
				</dependency>
			</dependencies>
			<executions>
				<execution>
					<goals>
						<goal>wsimport</goal>
					</goals>
				</execution>
			</executions>
			<configuration>
				<packageName>com.bmc.ao.xsd._2008._09.soa</packageName>
				<verbose>true</verbose>
				<xdebug>true</xdebug>
				<wsdlDirectory>${project.basedir}/src/wsdl</wsdlDirectory>
				<vmArgs>
					<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
					<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
				</vmArgs>
			</configuration>
		</plugin>

[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.4.1:wsimport (default) on project ws-orchestrator: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.4.1:wsimport (default) on project ws-orchestrator: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:353)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:198)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
at org.codehaus.mojo.jaxws.AbstractJaxwsMojo.exec (AbstractJaxwsMojo.java:488)
at org.codehaus.mojo.jaxws.WsImportMojo.processLocalWsdlFiles (WsImportMojo.java:340)
at org.codehaus.mojo.jaxws.WsImportMojo.executeJaxws (WsImportMojo.java:289)
at org.codehaus.mojo.jaxws.MainWsImportMojo.executeJaxws (MainWsImportMojo.java:51)
at org.codehaus.mojo.jaxws.AbstractJaxwsMojo.execute (AbstractJaxwsMojo.java:389)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:353)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:198)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@theit
Copy link
Contributor

theit commented Jan 13, 2020

Can you try again with plugin version 2.6? It contains some fixes for Java >=9.

@fahmed116
Copy link

fahmed116 commented Apr 10, 2021

I'm facing same issue while using version 2.6 with OpenJDK v11. Below are the details, please help!

        <plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>jaxws-maven-plugin</artifactId>
			<version>2.6</version>

			<executions>
				<execution>
					<id>wsimport-from-jdk</id>
					<goals>
						<goal>wsimport</goal>
					</goals>
				</execution>
			</executions>
			<configuration>
				<args>
					<arg>-XautoNameResolution</arg>
				</args>
				<wsdlDirectory>${project.basedir}/src/main/resources/wsdl</wsdlDirectory>
				<packageName>com.simplifi.gps</packageName>
				<keep>true</keep>
				<sourceDestDir>${project.build.directory}/generated-sources/soap</sourceDestDir>
				<vmArgs>
					<vmArg>-Djavax.xml.accessExternalDTD=all</vmArg>
					<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
				</vmArgs>
			</configuration>
		</plugin>

Java version: 11.0.2, vendor: Oracle Corporation, runtime: /home/vend/.sdkman/candidates/java/11.0.2-open

[ERROR] Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.6:wsimport (default-cli) on project my-adapter: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.6:wsimport (default-cli) on project my-adapter: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
at org.codehaus.mojo.jaxws.AbstractJaxwsMojo.exec (AbstractJaxwsMojo.java:500)
at org.codehaus.mojo.jaxws.WsImportMojo.processLocalWsdlFiles (WsImportMojo.java:339)
at org.codehaus.mojo.jaxws.WsImportMojo.executeJaxws (WsImportMojo.java:292)
at org.codehaus.mojo.jaxws.MainWsImportMojo.executeJaxws (MainWsImportMojo.java:54)
at org.codehaus.mojo.jaxws.AbstractJaxwsMojo.execute (AbstractJaxwsMojo.java:386)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@theit
Copy link
Contributor

theit commented Apr 28, 2021

Hi,

sorry for my late responding. Do you have a minimal sample that you can share? Without that it's hard to figure out what is causing the error you're seeing.

Some thoughts:

  1. Are your dependencies complete and correct?
  2. Do you have a module descriptor for your code? If yes, is it complete working?
  3. Generate the code from your WSDL using wsimport from Java 8, copy the generated files to your project and check whether your code still compiles.

@simonmeier
Copy link

I'm using jaxws-maven-plugin version 2.6 in a Maven Project and I receive the same error inclusive same stacktrace.

The Maven project once ran (inclusive the wsimport goal) but is not running any more after a new installation of my pc, thus I assume some dependency issues.

However the error appears JDK independent in OpenJDK 11+28, but also in JDK Oracle 1.8.
What confuses me is the log output "check output", which output is meant? CLI output or some log file?

Regarding your thoughts @theit:

  • What dependencies do you mean must be complete and correct?

Thanks in advance.
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants