You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ron Gavlin (JIRA)" <tu...@ws.apache.org> on 2007/07/19 22:26:06 UTC

[jira] Commented: (TUSCANY-1457) Unable to code gen SDOModel.xsd

    [ https://issues.apache.org/jira/browse/TUSCANY-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513988 ] 

Ron Gavlin commented on TUSCANY-1457:
-------------------------------------

David,

What command-line options are you using to invoke the XSD2JavaGenerator in this context?

> 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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org