> -----Original Message----- > From: Werner Guttmann [mailto:[email protected]] > Sent: Wednesday, July 15, 2009 3:42 AM > To: [email protected] > Subject: Re: [castor-user] Stack overflow processing schema > > Hi, > > let'y try something first before looking at this in detail. I have > provided some detailed answers to your other questions. Can you please > digest, and see whether automatic conflict resolution gets you going > again (or even solves those name conflict problems completely). > > If not, we will have to look into a few things one by one.
Before I submit a bug for this, here's a sample schema that I spent 2 minutes constructing that repeats the problem. ---Bug.xsd--------------- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://csi.cingular.com/CSI/Namespaces/Types/Public/CingularDataM odel.xsd" targetNamespace="http://csi.cingular.com/CSI/Namespaces/Types/Public/Cin gularDataModel.xsd" elementFormDefault="qualified" version="24.0.40"> <xs:element name="ProductSubscription" type="SomethingServiceProductSubscriptionInfo"> </xs:element> <xs:complexType name="SomethingServiceProductSubscriptionInfo"> <xs:sequence> <xs:element name="componentName" type="xs:string"/> <xs:element name="ComponentAttributes" type="SomethingServiceProductComponentAttributeInfo" maxOccurs="unbounded"/> <xs:element name="ProductSubscription" type="SomethingServiceProductSubscriptionInfo" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="SomethingServiceProductComponentAttributeInfo"> <xs:sequence> <xs:element name="attributeName" type="xs:string"/> <xs:element name="attributteValue" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> ------------------ I ran this with the following command line: ------------ java -classpath "$castorcp" org.exolab.castor.builder.SourceGeneratorMain \ -i src/main/wsdl/csi/Common/Types/Public/Bug.xsd \ -package com.cingular.interfaces.csi.soap.types \ -dest gen2 -verbose -nameConflictStrategy informViaLog -types j2 ------------ Where "$castorcp" consists of commons-logging-1.0.4.jar, castor-1.3-core.jar, castor-1.3-xml-schema.jar, castor-1.3.jar, castor-1.3-codegen.jar, and ".". > KARR, DAVID (ATTCINW) wrote: > > I'm trying to set up a process to use Castor on a set of schemas. I > > haven't written any mapping files yet, just to see what I get out of > the > > box. I've set it to "informViaLog" for now. When I run the process, > it > > emits "Creating classes for" 647 times and "A class name generation > > conflict" 1062 times, but before ending successfully, it dies with a > > stack overflow error. > > > > The end of the output consists of this (elided): > > ------------------------- > > WARNING: Warning: A class name generation conflict has occured > between > > element > > > '/complexType:SomethingProductSubscriptionInfo/ProductSubscription[/com > p > > lexType:SomethingProductSubscriptionInfo]' and element > > > '/complexType:SomethingOrderProductInfo/ProductSubscription[/complexTyp > e > > :SomethingProductSubscriptionInfo]'. Please use a Binding file to > solve > > this problem. > > Exception in thread "main" java.lang.StackOverflowError > > at java.util.Arrays.copyOf(Unknown Source) > > at java.util.Arrays.copyOf(Unknown Source) > > at java.text.DateFormatSymbols.getShortMonths(Unknown Source) > > at java.text.SimpleDateFormat.subFormat(Unknown Source) > > at java.text.SimpleDateFormat.format(Unknown Source) > > at java.text.SimpleDateFormat.format(Unknown Source) > > at java.text.DateFormat.format(Unknown Source) > > at java.text.Format.format(Unknown Source) > > at java.text.MessageFormat.subformat(Unknown Source) > > at java.text.MessageFormat.format(Unknown Source) > > at java.util.logging.SimpleFormatter.format(Unknown Source) > > at java.util.logging.StreamHandler.publish(Unknown Source) > > at java.util.logging.ConsoleHandler.publish(Unknown Source) > > at java.util.logging.Logger.log(Unknown Source) > > at java.util.logging.Logger.doLog(Unknown Source) > > at java.util.logging.Logger.logp(Unknown Source) > > at > > org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:91) > > at > > > org.apache.commons.logging.impl.Jdk14Logger.warn(Jdk14Logger.java:242) > > at > > > org.exolab.castor.builder.conflictresolution.InformViaLogClassNameCRStr > a > > > tegy.dealWithClassNameConflict(InformViaLogClassNameCRStrategy.java:143 > ) > > at > > > org.exolab.castor.builder.SingleClassGenerator.process(SingleClassGener > a > > tor.java:354) > > at > > > org.exolab.castor.builder.SingleClassGenerator.process(SingleClassGener > a > > tor.java:314) > > at > > > org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator > . > > java:944) > > at > > > org.exolab.castor.builder.SourceGenerator.processContentModel(SourceGen > e > > rator.java:1094) > > at > > > org.exolab.castor.builder.SourceGenerator.processContentModel(SourceGen > e > > rator.java:1097) > > at > > > org.exolab.castor.builder.SourceGenerator.processComplexType(SourceGene > r > > ator.java:1040) > > at > > > org.exolab.castor.builder.SourceGenerator.createClasses(SourceGenerator > . > > java:950) > > ------------------------- > > > > The last four stack entries are repeated ad infinitum. > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

