axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Lindquist (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4143) Type.Property (ex A.B) and Type (ex AB) Names Collide in Object Factory (jaxbri Code Generation) -- Two declarations cause a collision in the ObjectFactory class
Date Fri, 21 Nov 2008 17:57:44 GMT
Type.Property (ex A.B) and Type (ex AB) Names Collide in Object Factory (jaxbri Code Generation)
-- Two declarations cause a collision in the ObjectFactory class
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-4143
                 URL: https://issues.apache.org/jira/browse/AXIS2-4143
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.4.1
         Environment: Windows XP (x86), Apache Axis2 1.4.1, Sun JDK 1.5.0_12
            Reporter: Dave Lindquist
            Priority: Minor


When using JAXBRI bindings and generating from a WSDL via wsdl2java.bat, it is possible for
a Type.Property and Type name to collide in ObjectFactory.

For example, if my XSD has:
* A type named "Something"
* A type named "Some" with a property named "thing" (and this property is also an "anonymous"
complex type)

I will get an error on code generation that says:

[ERROR] Two declarations cause a collision in the ObjectFactory class.
[ERROR] (Related to above error) This is the other declaration.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
        ... 3 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to generate code
using jaxbri
        at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:304)
        ... 8 more
Caused by: java.lang.RuntimeException: Unable to generate code using jaxbri
        at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:196)
        ... 8 more

The bug here is two-fold:
* First, I get absolutely nothing in terms of information that helps me track down WHAT declarations
collided (the second message line looks like it was intending to provide that, but it doesn't).
* Secondly, that it collides at all (this is a perfectly valid case, and should be handled
in codegen).

I will attach example WSDLs that create this case when generated.

The command line used is:
wsdl2java.bat -o (output directory) -b jaxbri -uri (wsdl file)

-- 
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


Mime
View raw message