cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SAURABH NIGAM (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-4239) WSDL2Java Task fails to generate src files Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
Date Thu, 12 Apr 2012 08:19:14 GMT
WSDL2Java Task fails to generate src files Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
-----------------------------------------------------------------------------------------------------------------------------------------

                 Key: CXF-4239
                 URL: https://issues.apache.org/jira/browse/CXF-4239
             Project: CXF
          Issue Type: Task
          Components: Tooling
    Affects Versions: 2.3.9
         Environment: Windows XP, Eclipse Helios, Java 1.6 version
            Reporter: SAURABH NIGAM
            Priority: Critical


We have a webservice up and running, currently exposed through CXF Simple frontend. But when
we try to generate proxy jar for it using WSDL2Java utility provided by CXF 2.3,9 version
, we are getting some exceptions, which we are unable to debug further. Please find below
the ant build.xml used for generating the src java files :-
<?xml version="1.0"?>
<project name="cxf wsdl2java" basedir=".">   
   <property file="./../src/antbuild/eflow_project_windows.properties" />	
   <path id="cxf.classpath">
      <fileset dir="./lib">
         <include name="*.jar"/>
      </fileset>
   </path>
      
   <target name="cxfWSDLToJava">
      <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
      	 <arg value="-client"/>
         <arg value="-d"/>
         <arg value="src"/>
      	 <arg value="-verbose"/> 
         <arg value="http://z1dnd83a.dev.qintra.com:40400/eflow/services/EflowProvisioningServices?wsdl"/>
        <classpath>
            <path refid="cxf.classpath"/>
         </classpath>
      </java>
   </target>
</project>

The lib directory here being used for cxf classpath has all the libraries from the CXF 2.3.9
distribution binary.

The exception stack trace we are experiencing is as follows :-
Buildfile: C:\eflow_workspace_GWT\EFLOW_AUG\wsdl2java\build_webservices_client.xml
cxfWSDLToJava:
     [java] Loading FrontEnd jaxws ...
     [java] Loading DataBinding jaxb ...
     [java] wsdl2java -client -d src -verbose http://z1dnd83a.dev.qintra.com:40400/eflow/services/EflowProvisioningServices?wsdl
     [java] wsdl2java - Apache CXF 2.3.9
     [java] WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException
     [java] org.apache.cxf.tools.common.ToolException: java.lang.reflect.UndeclaredThrowableException
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:301)
     [java] 	at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
     [java] Caused by: java.lang.reflect.UndeclaredThrowableException
     [java] 	at $Proxy39.required(Unknown Source)
     [java] 	at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:192)
     [java] 	at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:161)
     [java] 	at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:80)
     [java] 	at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:94)
     [java] 	at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:81)
     [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     [java] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     [java] 	at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:69)
     [java] 	at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:82)
     [java] 	at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:774)
     [java] 	at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:555)
     [java] 	at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:258)
     [java] 	at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:166)
     [java] 	at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
     [java] 	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:283)
     [java] 	at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:94)
     [java] 	at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:393)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:598)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:250)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
     [java] 	at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:293)
     [java] 	... 4 more
     [java] Caused by: java.lang.NoSuchMethodException: javax.xml.bind.annotation.XmlElementRef.required()
     [java] 	at java.lang.Class.getDeclaredMethod(Class.java:1937)
     [java] 	at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:112)
     [java] 	... 28 more
BUILD SUCCESSFUL
Total time: 6 seconds


Please guide us as to how to get this issue resolved as we are kind of stuck due to this issue.
It seems that some method is missing while trying to call through reflection, but since we
don't have any java source file as of now, I am unable to debug it further. This exception
we are getting while trying to generate java proxy src files using WSDL2Java utility from
CXF version 2.3.9.

Any help of any sort will be highly appreciated. Please take it as a high priority, as its
blocking our production delivery schedule.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message