You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Matt Luongo <ma...@provenmethod.com> on 2010/06/10 17:53:15 UTC
Failed to generate types
Hey everybody,
I'm running into an interesting exception and am hoping that someone will
have some experience or even a better debugging approach.
I'm trying to use the hyperjaxb3 EJB plugin to generate JPA annotations on a
CXF WSDL-first web service.
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<dependencies>
<dependency>
<groupId>com.tpm</groupId>
<artifactId>xjcAddConstructor</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>org.jvnet.hyperjaxb3</groupId>
<artifactId>hyperjaxb3-ejb-plugin</artifactId>
<version>0.5.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/CDXLEAToCourt.wsdl
</wsdl>
<bindingFiles>
<!-- JAX-WS bindings -->
<bindingFile>${basedir}/src/main/resources/wsdl/wsdlBinding.xml
</bindingFile>
<!-- XJC bindings -->
<bindingFile>${basedir}/src/main/resources/wsdl/wsdlBinding.xjb
</bindingFile>
</bindingFiles>
<xjcargs>
<xjcarg>-Xequals</xjcarg>
<xjcarg>-XtoString</xjcarg>
<xjcarg>-Xadd-constructor</xjcarg>
<xjcarg>-Xhyperjaxb3-ejb</xjcarg>
</xjcargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
When I generate sources, wsdl2java chokes with the attached stack trace.
Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.2.7:wsdl2java
(generate-sources) on project leaToCourtWS: Failed to generate types. ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.cxf:cxf-codegen-plugin:2.2.7:wsdl2java (generate-sources) on
project leaToCourtWS: Failed to generate types.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:585)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
generate types.
at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.callWsdl2Java(WSDL2JavaMojo.java:409)
at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:361)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
... 14 more
Caused by: org.apache.cxf.tools.common.ToolException: Failed to generate
types.
at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.generate(JAXBDataBinding.java:716)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:582)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:228)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:128)
at
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:271)
at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at
org.apache.cxf.maven_plugin.WSDL2JavaMojo.callWsdl2Java(WSDL2JavaMojo.java:406)
... 17 more
I know that the error is on the part of the Hyperjaxb plugin, but I can't
even come up with a decent method to track the exception back to the plugin.
Any ideas?
Thanks!
--
Matt Luongo
Software Developer - The Proven Method
www.provenmethod.com
404.238.8470 - mhluongo@gmail.com
Re: Failed to generate types
Posted by Matt Luongo <ma...@provenmethod.com>.
Thanks Aleksei.
--
Matt Luongo
Software Developer - The Proven Method
www.provenmethod.com
404.238.8470 - mhluongo@gmail.com
On Thu, Jun 10, 2010 at 2:40 PM, Aleksei Valikov
<al...@gmail.com>wrote:
> You've probably missed my answer:
> ========================================-
> Hi Matt,
>
> > I'm trying to use the hyperjaxb3 EJB plugin to generate JPA annotations
> on a
> > CXF WSDL-first web service.
>
> Support for CXF integration was introduced first in 0.5.5. This
> version not yet released. If you want you can get it from:
>
> http://repository.highsource.org/maven2/snapshots/
>
> and play with it.
>
> Here's a tutorial:
>
>
> http://confluence.highsource.org/display/HJ3/Apache+CXF+Tutorial+-+Building+JAX-WS,+JAXB+and+JPA-based+web+service+with+Apache+CXF,+Spring+and+Hyperjaxb3
>
> Bye.
> /lexi
>
Re: Failed to generate types
Posted by Aleksei Valikov <al...@gmail.com>.
You've probably missed my answer:
========================================-
Hi Matt,
> I'm trying to use the hyperjaxb3 EJB plugin to generate JPA annotations on a
> CXF WSDL-first web service.
Support for CXF integration was introduced first in 0.5.5. This
version not yet released. If you want you can get it from:
http://repository.highsource.org/maven2/snapshots/
and play with it.
Here's a tutorial:
http://confluence.highsource.org/display/HJ3/Apache+CXF+Tutorial+-+Building+JAX-WS,+JAXB+and+JPA-based+web+service+with+Apache+CXF,+Spring+and+Hyperjaxb3
Bye.
/lexi