[ https://issues.apache.org/jira/browse/TUSCANY-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513990 ]
David T. Adcox commented on TUSCANY-1457: ----------------------------------------- Kelvin, that is correct. Per the directions in the java doc at the top of ModelFactoryImpl. > Unable to code gen SDOModel.xsd > ------------------------------- > > Key: TUSCANY-1457 > URL: https://issues.apache.org/jira/browse/TUSCANY-1457 > Project: Tuscany > Issue Type: Bug > Components: Java SDO Tools > Affects Versions: Java-SDO-M2 > Environment: n/a > Reporter: David T. Adcox > Fix For: Java-SDO-1.0 > > > When I attempt to generate the java source files representing the SDOModel, I > am seeing a NPE thrown in SDOXSDEcoreBuilder.java. Here is the stack trace: > java.lang.NullPointerException > at > org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.lookupPrefix(SDOXSDEcoreBuilder.java:104) > at > org.apache.tuscany.sdo.helper.SDOXSDEcoreBuilder.getEPackage(SDOXSDEcoreBuilder.java:129) > at > org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.getEStructuralFeature(BaseSDOXSDEcoreBuilder.java:1413) > at > org.apache.tuscany.sdo.helper.BaseSDOXSDEcoreBuilder.generate(BaseSDOXSDEcoreBuilder.java:1512) > at > org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:247) > at > org.apache.tuscany.sdo.helper.XSDHelperImpl.define(XSDHelperImpl.java:224) > at > org.apache.tuscany.sdo.generate.XSD2JavaGenerator.generateFromXMLSchema(XSD2JavaGenerator.java:179) > at > org.apache.tuscany.sdo.generate.XSD2JavaGenerator.run(XSD2JavaGenerator.java:146) > at > org.apache.tuscany.sdo.generate.XSD2JavaGenerator.main(XSD2JavaGenerator.java:96) > I've tracked the issue down to some code changes made for T-513. A change > was made in XSDHelperImpl in the define method to change how the ResourceSet > is constructed prior to loading the schema. Additional changes were made in > SDOXSDEcoreBuilder to set up some options when constructing a ResourceSet. > These combined changes seem to be precipitating the issue. The > XSDSchemaAdapterFactoryImpl inner class contains a method > isFactoryForType(Object) that appears to be setting up conditions such that > more elementDeclarations than should be expected is being created, later > leading to the NPE. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]