You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Pierre Casenove (JIRA)" <ji...@apache.org> on 2007/08/03 16:29:52 UTC

[jira] Commented: (AXIS2-3064) InvocationTargetException during code generation using JAXBRI

    [ https://issues.apache.org/jira/browse/AXIS2-3064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517549 ] 

Pierre Casenove commented on AXIS2-3064:
----------------------------------------

Looking at the code, the issue happens during the bind operation:
                // Bind the XML
                S2JJAXBModel jaxbModel = sc.bind();

                if(jaxbModel == null){
                    throw new RuntimeException("Unable to generate code using jaxbri");
                }

> InvocationTargetException during code generation using JAXBRI
> -------------------------------------------------------------
>
>                 Key: AXIS2-3064
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3064
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.3
>         Environment: Axis2 1.3 RC3
>            Reporter: Pierre Casenove
>         Attachments: faultywsdl.zip
>
>
> WSDL2Java operation fails with the following exception:
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
>      [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>      [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>      [java] Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>      [java] at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
>      [java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)
>      [java] ... 2 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
>      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      [java] at java.lang.reflect.Method.invoke(Method.java:615)
>      [java] at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
>      [java] ... 3 more
>      [java] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to generate code using jaxbri
>      [java] at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:177)
>      [java] ... 8 more
>      [java] Caused by: java.lang.RuntimeException: Unable to generate code using jaxbri
>      [java] at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:152)
>      [java] ... 8 more
>      [java] Java Result: 1
> Ant task used:
> 	<target name="wsdl2java" depends="clean,prepare">
> 		<delete dir="output" />
> 		<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
> 			<classpath refid="axis.classpath" />
> 			<arg value="-d" />
> 			<arg value="jaxbri" />
> 			<arg value="-uri" />
> 			<arg file="${dir.wsdl}/${uri.wsdl}" />
> 			<arg value="-ss" />
> 			<arg value="-g" />
> 			<arg value="-sd" />
> 			<arg value="-ssi" />
> 			<arg value="-o" />
> 			<arg file="output" />
> 		</java>
> 		<!-- Move the schema folder to classpath-->
> 		<mkdir dir="output/resources/META-INF" />
> 		<move todir="output/resources/META-INF">
> 			<fileset dir="output/resources">
> 				<!-- axis2 web services definitions file -->
> 				<include name="services.xml" />
> 				<include name="*.wsdl" />
> 				<include name="*.xsd" />
> 			</fileset>
> 		</move>
> </target>
> The WSDL is correctly parsed and the code generated when using official jaxb 2.0.5 distribution and the included xjc.bat script file.
> Attached files: faulty wsdl with the imported xsd in the wsdl.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org