[ https://issues.apache.org/jira/browse/AXIS2-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293871#comment-14293871 ]
nadir amra commented on AXIS2-1083: ----------------------------------- Wondering how this was fixed since Axis Java has the same problem? > WSDL2Java: SchemaLocation and circular imports / StackOverflowError > ------------------------------------------------------------------- > > Key: AXIS2-1083 > URL: https://issues.apache.org/jira/browse/AXIS2-1083 > Project: Axis2 > Issue Type: Bug > Components: wsdl > Affects Versions: 1.0 > Environment: WinXP, JRE 1.5 > Reporter: Oliver Grafe > Assignee: Deepal Jayasinghe > Priority: Critical > Attachments: ASF.LICENSE.NOT.GRANTED--wsdl_import.tar.gz > > > As suggested on the mailing list I'm filing a bug report. > I'm having problems to use Axis2 WSDL2Java with some test WSDL and schema > files I made, see attached files. Some of the schemas are importing each > other, I think that is confusing WSDL2Java. > Command for code generation: > C:\wsdltest>java org.apache.axis2.wsdl.WSDL2Java -uri ord.wsdl > error.txt > 2>&1 > error.txt: > Retrieving schema at './xsd/ord.xsd', relative to 'file:/C:/wsdltest/'. > Retrieving schema at './prod1.xsd', relative to > 'file:/C:/wsdltest/xsd/ord.xsd'. > Retrieving schema at './prod2.xsd', relative to > 'file:/C:/wsdltest/xsd/prod1.xsd'. > Retrieving schema at './prod1.xsd', relative to > 'file:/C:/wsdltest/xsd/prod2.xsd'. > Retrieving schema at './common.xsd', relative to > 'file:/C:/wsdltest/xsd/prod2.xsd'. > Retrieving schema at './common.xsd', relative to > 'file:/C:/wsdltest/xsd/prod1.xsd'. > Retrieving schema at './common.xsd', relative to > 'file:/C:/wsdltest/xsd/ord.xsd'. > Retrieving schema at './prod2.xsd', relative to > 'file:/C:/wsdltest/xsd/ord.xsd'. > Exception in thread "main" java.lang.StackOverflowError > at java.util.ArrayList.get(Unknown Source) > at sun.misc.URLClassPath.getLoader(Unknown Source) > at sun.misc.URLClassPath.findResource(Unknown Source) > at java.net.URLClassLoader$2.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findResource(Unknown Source) > at java.lang.ClassLoader.getResource(Unknown Source) > at java.lang.ClassLoader.getResource(Unknown Source) > at java.lang.ClassLoader.getResourceAsStream(Unknown Source) > at javax.xml.parsers.SecuritySupport$4.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source) > at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown > Source) > at javax.xml.parsers.FactoryFinder.find(Unknown Source) > at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:213) > at > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1911) > at > org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1708) > at > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:126) > at > org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:53) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:255) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:217) > at > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1911) > at > org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1708) > at > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:126) > at > org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:53) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:255) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:217) > at > org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1911) > at > org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1708) > at > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:126) > [... last 6 lines repeated over and over] > BTW, these files are working with Axis 1.4 wsdl2java. And according to XMLSpy > my wsdl and schemas are valid, but that doesn't mean anything. > Thanks you very much, > Oliver -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org For additional commands, e-mail: java-dev-h...@axis.apache.org