Thank you both ! I can run now the java2wsdl goal, the problem is I'm
getting a nasty exception. Any idea about what may be causing it ?

Here is an except from the trace.

INFO: Creating Service {http://document.ws.foo.com/}FooServ
ice from class com.foo.document.DocumentWSImpl
Error: java.lang.ClassCastException:
com.sun.xml.bind.v2.model.impl.RuntimeBuilt
inLeafInfoImpl$5

JavaToWSDL Error : java.lang.ClassCastException:
com.sun.xml.bind.v2.model.impl.
RuntimeBuiltinLeafInfoImpl$5

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] ExitException: status 1

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: ExitException:
status 1
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(Defa
ultLifecycleExecutor.java:559)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
(Defau
ltLifecycleExecutor.java:454)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLi
fecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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: ExitException:
status
 1
        at org.apache.cxf.maven_plugin.Java2WSDLMojo.processJavaClass
(Java2WSDLM
ojo.java:211)
        at org.apache.cxf.maven_plugin.Java2WSDLMojo.execute(
Java2WSDLMojo.java:
114)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPlugi
nManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
(Defa
ultLifecycleExecutor.java:534)
        ... 16 more
Caused by: org.apache.tools.ant.ExitException: ExitException: status 1
        at
org.apache.tools.ant.util.optional.NoExitSecurityManager.checkExit(No
ExitSecurityManager.java:38)
        at java.lang.Runtime.exit(Runtime.java:88)
        at java.lang.System.exit(System.java:869)
        at org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java
:50)
        at org.apache.cxf.maven_plugin.Java2WSDLMojo.processJavaClass
(Java2WSDLM
ojo.java:201)
        ... 19 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Mon Oct 15 10:20:56 CEST 2007
[INFO] Final Memory: 11M/20M
[INFO]
------------------------------------------------------------------------





2007/10/12, James Mao <[EMAIL PROTECTED]>:
>
> FYI, Cxf2.0.2 still using java2wsdl, so you dont' need to change the
> goal to java2ws
> If you're using latest trunk, you need to change to java2ws, CXF2.0.2 is
> the last version which using java2wsdl
>
> Besides, your version
>
> <version>2.0-incubator-M1</version>
>
> is not correct
>
> Try the
>
> 2.0.2-incubator as DanK said
>
>
> Regards,
> James
>
>
> > Hello James,
> > I'm using Apache CXF 2.0.2.
> > Here's an extract from my pom.xml
> >
> > <plugins>
> >             <plugin>
> >                 <groupId>org.apache.maven.plugins</groupId>
> >                 <artifactId>maven-compiler-plugin</artifactId>
> >                 <configuration>
> >                     <encoding>UTF-8</encoding>
> >                     <source>1.5</source>
> >                     <target>1.5</target>
> >                     <showDeprecation>true</showDeprecation>
> >                     <showWarnings>true</showWarnings>
> >                 </configuration>
> >             </plugin>
> >             <plugin>
> >               <groupId>org.apache.cxf</groupId>
> >               <artifactId>cxf-codegen-plugin</artifactId>
> >               <version>2.0-incubator-M1</version>
> >               <dependencies>
> >                 <dependency>
> >                   <groupId>org.apache.cxf</groupId>
> >                   <artifactId>cxf-rt-frontend-jaxws</artifactId>
> >                   <version>2.0</version>
> >                 </dependency>
> >               </dependencies>
> >               <executions>
> >                 <execution>
> >                   <id>generate-wsdl</id>
> >                   <phase>process-classes</phase>
> >                   <configuration>
> >                     <className>foo.myClass</className>
> >                   </configuration>
> >                   <goals>
> >                     <goal>java2ws</goal>
> >                   </goals>
> >                 </execution>
> >               </executions>
> >             </plugin>
> >
> > 2007/10/11, James Mao <[EMAIL PROTECTED]>:
> >
> >> What's the version of cxf are you using? it's been changed to java2ws
> >> http://cwiki.apache.org/CXF20DOC/java-to-ws.html
> >>
> >> James
> >>
> >>
> >>> Hi, I've been trying to use the Maven plugin but  I'm getting this
> >>>
> >> error.
> >>
> >>> [INFO] Scanning for projects...
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> ---
> >>> [INFO] Building FooProject Web Services Wrapper
> >>> [INFO]    task-segment: [package]
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> ---
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> [ERROR] BUILD ERROR
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> [INFO] 'java2wsdl' was specified in an execution, but not found in the
> >>> plugin
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> [INFO] For more information, run Maven with the -e switch
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>> [INFO] Total time: 1 second
> >>> [INFO] Finished at: Thu Oct 11 13:40:06 CEST 2007
> >>> [INFO] Final Memory: 3M/5M
> >>> [INFO]
> >>> ----------------------------------------------------------------------
> >>>
> >>>
> >>>
> >
> >
>

Reply via email to