2 Replies Latest reply: Jun 21, 2012 3:01 AM by gimbal2 RSS

    Error executing: wsimport in Hudson using Maven

    326738
      Hi,

      I tried to build my application in Hudson and encountered below error :

      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error executing: wsimport [-s, /var/lib/hudson/jobs/xxx/workspace/xxx/xxx/target/jaxws/wsimport/java, -d, /var/lib/hudson/jobs/xxx/workspace/xxx/xxx/target/classes, -p, com.xxx.xxx.xxx.client, -Xnocompile, https://xxx?wsdl]
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
           at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
           at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
           at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
           at hudson.maven.agent.Main.launch(Main.java:165)
           at hudson.maven.MavenBuilder.call(MavenBuilder.java:159)
           at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:688)
           at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:632)
           at hudson.remoting.UserRequest.perform(UserRequest.java:114)
           at hudson.remoting.UserRequest.perform(UserRequest.java:48)
           at hudson.remoting.Request$2.run(Request.java:270)
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
           at java.util.concurrent.FutureTask.run(FutureTask.java:138)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing: wsimport [-s, /var/lib/hudson/jobs/xxx/workspace/xxx/xxx/target/jaxws/wsimport/java, -d, /var/lib/hudson/jobs/xxx/workspace/xxx/xxx/target/classes, -p, com.xxx.xxx.xxx.client, -Xnocompile, https://xxx?wsdl]
           at org.codehaus.mojo.jaxws.WsImportMojo.wsImport(WsImportMojo.java:294)
           at org.codehaus.mojo.jaxws.WsImportMojo.processWsdlViaUrls(WsImportMojo.java:271)
           at org.codehaus.mojo.jaxws.WsImportMojo.execute(WsImportMojo.java:204)
           at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
           at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)


      FYI, i'm using Maven 2.2.1 and Java 1.6.0_17, i am also using jaxws-maven-plugin and below is the setting of my pom.xml file

      <plugins>
                     <plugin>
                          <groupId>org.codehaus.mojo</groupId>
                          <artifactId>jaxws-maven-plugin</artifactId>
                          <version>1.12</version>
                          <executions>
                               <execution>
                                    <goals>
                                         <goal>wsimport</goal>
                                    </goals>
                               </execution>
                          </executions>
                          <configuration>
                               <wsdlUrls>
                                    <wsdlUrl>https://xxx1?wsdl</wsdlUrl>
                                    <wsdlUrl>https://xxx2?wsdl</wsdlUrl>                    
                               </wsdlUrls>
                               <packageName>com.xxx.xxx.xxx.client</packageName>
                          </configuration>
                          <dependencies>
                               <dependency>
                                    <groupId>org.slf4j</groupId>
                                    <artifactId>slf4j-simple</artifactId>
                                    <version>${slf4j-version}</version>
                               </dependency>
                          </dependencies>
                     </plugin>
                </plugins>

      Does anyone knows what does the error means? Thank you in advance.
        • 1. Re: Error executing: wsimport in Hudson using Maven
          944996
          I had a similar problem with building my own project using jaxws. I'm not sure what's causing it, but after searching around different forums for a while i read
          a post suggesting explicitly including some additional dependencies in the plugin, which solved it for me:

          <plugin>
                         <groupId>org.jvnet.jax-ws-commons</groupId>
                         <artifactId>jaxws-maven-plugin</artifactId>
                         <version>2.2</version>
                         <executions>
                              <execution>
                                   <goals>
                                        <goal>wsimport</goal>
                                   </goals>
                              </execution>
                         </executions>
                         <configuration>
                              <extension>true</extension>
                         </configuration>
                         <dependencies>
                              <dependency>
                                   <groupId>xerces</groupId>
                                   <artifactId>xercesImpl</artifactId>
                                   <version>2.9.1</version>
                              </dependency>
                              <dependency>
                                   <groupId>com.sun.xml.bind</groupId>
                                   <artifactId>jaxb-xjc</artifactId>
                                   <version>2.1.3</version>
                              </dependency>
                              <dependency>
                                   <groupId>com.sun.xml.ws</groupId>
                                   <artifactId>jaxws-tools</artifactId>
                                   <version>2.1.3</version>
                              </dependency>
                         </dependencies>
                    </plugin>
          • 2. Re: Error executing: wsimport in Hudson using Maven
            gimbal2
            Then you were probably polluting (willingly or unwillingly) your classpath with mixed versions of the jax-ws API and runtime and/or the jaxb API and runtime; having version mismatches can lead to much grief. A transient dependency in Maven can already do it, using mvn dependency:tree to see where all the dependencies come from is basically a must (or use the easier m2eclipse graphical view if you're an eclipse user).