Error occured while testing the "Code Generator Tool- Command Line and Ant Task"
--------------------------------------------------------------------------------

                 Key: AXIS2-1173
                 URL: http://issues.apache.org/jira/browse/AXIS2-1173
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
         Environment: Windows XP, jdk1.5.0_08, Maven 1.0.2, Mozilla Firefox 
1.5.0.6
            Reporter: Evanthika Amarasiri
            Priority: Blocker


Downloaded the nightly builds and was testing the "Code Generator Tool".
In the "Tool Reference" documentation "Code Generator Tool- Command Line & Ant 
Task", under the heading "Option Reference", it says that you can pass extra 
options by prefixing them with "-E". 

So I refered the document "ADB Integration With Axis2" (Section - Selection of 
Generation Modes for ADB) and typed the command  "WSDL2Java -uri 
..\samples\wsdl\Axis2SampleDocLit.wsdl -Er true". It threw and exception.

When I tried the command "WSDL2Java -uri 
..\samples\wsdl\Axis2SampleDocLit.wsdl", it created the src files correctly. 
The problem occured only when I gave the command along with "-Er true"

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different 
document than the one th
at created it.
        at 
com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:38
9)
        at 
com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:321)
        at 
com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:275)
        at 
org.apache.axis2.schema.writer.JavaBeanWriter.writeExtensionMapper(JavaBeanWriter.java:11
55)
        at 
org.apache.axis2.schema.SchemaCompiler.finalizeSchemaCompilation(SchemaCompiler.java:376)

        at 
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:243)
        at 
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:71)
        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:585)
        at 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:4
9)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177
)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeE
xception: java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224
)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:5
2)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177
)
        ... 2 more
Caused by: java.lang.reflect.InvocationTargetException
        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:585)
        at 
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:4
9)
        ... 3 more
Caused by: org.apache.axis2.schema.SchemaCompilationException: 
org.w3c.dom.DOMException: WRONG_DOCUM
ENT_ERR: A node is used in a different document than the one that created it.
        at 
org.apache.axis2.schema.writer.JavaBeanWriter.writeExtensionMapper(JavaBeanWriter.java:11
73)
        at 
org.apache.axis2.schema.SchemaCompiler.finalizeSchemaCompilation(SchemaCompiler.java:376)

        at 
org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:243)
        at 
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:71)
        ... 8 more
Caused by: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a 
different document than
 the one that created it.
        at 
com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:38
9)
        at 
com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:321)
        at 
com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(NodeImpl.java:275)
        at 
org.apache.axis2.schema.writer.JavaBeanWriter.writeExtensionMapper(JavaBeanWriter.java:11
55)
        ... 11 more
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to