[ 
http://jira.codehaus.org/browse/MNG-3586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140609#action_140609
 ] 

Henri Gomez commented on MNG-3586:
----------------------------------

With IBM JDK 1.5 and maven 2.0.9 :

[DEBUG] jaxws:wsgen args: [-d, C:\Documents and 
Settings\gomezhe\Bureau\sample-wsgen\target\classes, -cp, C:\Documents and 
Settings\gomezhe\Bureau\sample-wsgen\target\classes;c:\maven-repository\com\sun\xml\ws\jaxws-rt\2.1.4\jaxws-rt-2.1.4.jar;c:\maven-repository\javax\xml\ws\jaxws-api\2.1\jaxws-api-2.1.jar;c:\maven-repository\javax\xml\bind\jaxb-api\2.1\jaxb-api-2.1.jar;c:\maven-repository\javax\xml\stream\stax-api\1.0\stax-api-1.0.jar;c:\maven-repository\javax\activation\activation\1.1\activation-1.1.jar;c:\maven-repository\javax\xml\soap\saaj-api\1.3\saaj-api-1.3.jar;c:\maven-repository\javax\annotation\jsr250-api\1.0\jsr250-api-1.0.jar;c:\maven-repository\javax\jws\jsr181-api\1.0-MR1\jsr181-api-1.0-MR1.jar;c:\maven-repository\com\sun\xml\bind\jaxb-impl\2.1.7\jaxb-impl-2.1.7.jar;c:\maven-repository\com\sun\xml\messaging\saaj\saaj-impl\1.3.1\saaj-impl-1.3.1.jar;c:\maven-repository\com\sun\xml\stream\buffer\streambuffer\0.7\streambuffer-0.7.jar;c:\maven-repository\org\jvnet\staxex\stax-ex\1.2\stax-ex-1.2.jar;c:\maven-repository\junit\junit\3.8\junit-3.8.jar;c:\maven-repository\com\sun\xml\stream\sjsxp\1.0.1\sjsxp-1.0.1.jar;c:\maven-repository\com\sun\org\apache\xml\internal\resolver\20050927\resolver-20050927.jar;c:\maven-repository\org\jvnet\mimepull\1.2\mimepull-1.2.jar;c:\maven-repository\com\sun\xml\ws\jaxws-tools\2.1.3\jaxws-tools-2.1.3.jar;c:\maven-repository\com\sun\xml\ws\jaxws-rt\2.1.3\jaxws-rt-2.1.3.jar;c:\maven-repository\javax\xml\ws\jaxws-api\2.1\jaxws-api-2.1.jar;c:\maven-repository\javax\xml\bind\jaxb-api\2.1\jaxb-api-2.1.jar;c:\maven-repository\javax\xml\stream\stax-api\1.0\stax-api-1.0.jar;c:\maven-repository\javax\activation\activation\1.1\activation-1.1.jar;c:\maven-repository\javax\xml\soap\saaj-api\1.3\saaj-api-1.3.jar;c:\maven-repository\javax\annotation\jsr250-api\1.0\jsr250-api-1.0.jar;c:\maven-repository\javax\jws\jsr181-api\1.0-MR1\jsr181-api-1.0-MR1.jar;c:\maven-repository\com\sun\xml\bind\jaxb-impl\2.1.6\jaxb-impl-2.1.6.jar;c:\maven-repository\com\sun\xml\messaging\saaj\saaj-impl\1.3\saaj-impl-1.3.jar;c:\maven-repository\com\sun\xml\stream\buffer\streambuffer\0.7\streambuffer-0.7.jar;c:\maven-repository\org\jvnet\staxex\stax-ex\1.2\stax-ex-1.2.jar;c:\maven-repository\com\sun\xml\stream\sjsxp\1.0\sjsxp-1.0.jar;c:\maven-repository\com\sun\org\apache\xml\internal\resolver\20050927\resolver-20050927.jar;c:\maven-repository\org\jvnet\mimepull\1.1\mimepull-1.1.jar;c:\maven-repository\com\sun\xml\bind\jaxb-xjc\2.1.6\jaxb-xjc-2.1.6.jar;c:\maven-repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\maven\lib\maven-2.0.9-uber.jar;C:\maven\lib\maven-2.0.9-uber.jar,
 -wsdl, -r, C:\Documents and 
Settings\gomezhe\Bureau\sample-wsgen\target\classes\com\mycorp\resources\wsdl, 
samplewsgen.SampleService]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to execute wsgen

Embedded error: com.sun.tools.apt.Main
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute wsgen
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to execute 
wsgen
        at 
org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:102)
        at org.codehaus.mojo.jaxws.MainWsGenMojo.execute(MainWsGenMojo.java:14)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 16 more
Caused by: java.lang.NoClassDefFoundError: com.sun.tools.apt.Main
        at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:194)
        at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
        at com.sun.tools.ws.WsGen.doMain(WsGen.java:69)
        at 
org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:97)
        ... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Fri Jul 04 11:32:07 CEST 2008
[INFO] Final Memory: 7M/22M
[INFO] ------------------------------------------------------------------------

It works for me with maven 2.0.9 (Sun 1.5 and 1.6).

Could you provided the log ?


> jaxws mojo wsgen failure with maven 2.1 
> ----------------------------------------
>
>                 Key: MNG-3586
>                 URL: http://jira.codehaus.org/browse/MNG-3586
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 2.1
>         Environment: Windows XP / Java 5 or 6
>            Reporter: Henri Gomez
>            Assignee: Brett Porter
>             Fix For: 2.1-alpha-1
>
>         Attachments: pom.xml, sample-wsgen-fixed.zip, sample-wsgen.zip
>
>
> I can build jar projects using the jaxws wsgen mojo (1.9) under maven
> 2.0.x but it failed under m2eclipse (0.9.3) when using maven 2.1
> embedded (it works if I switch m2eclipse to use the maven 2.0.9 on my
> system).
> I tried with various JVM (Sun and IBM 5 and 6) but still got the
> problem with maven 2.1 embedded (maven 2.1-620417 and 2.1-655675):
> error is :
> From file: C:\workspace\xxx-er-go\pom.xml
> Reason: Failed to execute wsgen
> java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>       at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>       at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
>       at 
> org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
>       at 
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:201)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>       at com.sun.tools.ws.WsGen.doMain(WsGen.java:69)
>       at 
> org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute(AbstractWsGenMojo.java:91)
>       at org.codehaus.mojo.jaxws.MainWsGenMojo.execute(MainWsGenMojo.java:14)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:577)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
>       at 
> org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:903)
>       at 
> org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
>       at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:52)
> Any idea or fixes ?
> my pom.xml wsgen is standard :
>       <build>
>               <plugins>
>                       <plugin>
>                               <artifactId>maven-compiler-plugin</artifactId>
>                               <configuration>
>                                       <source>1.5</source>
>                                       <target>1.5</target>
>                               </configuration>
>                               <executions>
>                                       <execution>
>                                               <id>compile</id>
>                                               <goals>
>                                                       <goal>compile</goal>
>                                               </goals>
>                                               <phase>initialize</phase>
>                                       </execution>
>                               </executions>
>                       </plugin>
>                       <!-- We need JAX-WS support for Annotation processing 
> -->
>                       <!-- NB: wsgen can handle only one SEI at a
> time so we define an
> execution by SEI -->
>                       <plugin>
>                               <groupId>org.codehaus.mojo</groupId>
>                               <artifactId>jaxws-maven-plugin</artifactId>
>                               <executions>
>                                       <execution>
>                                               <id>go-wsgen</id>
>                                               <goals>
>                                                       <goal>wsgen</goal>
>                                               </goals>
>                                               <phase>generate-sources</phase>
>                                               <configuration>
> <resourceDestDir>${project.build.directory}/classes/com/mycorp/service/resources/wsdl</resourceDestDir>
> <sei>com.mycorp.service.MyService</sei>
>                                                       <genWsdl>true</genWsdl>
>                                                       <keep>false</keep>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                       </plugin>
>               </plugins>
>       </build>
> I attached a simple project so you could try it.
> From others reports, it seems the tools.jar is missing in embedded mode.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to