You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org> on 2007/05/09 02:52:15 UTC

[jira] Updated: (TUSCANY-1254) Codegen on a type inheriting from a type in different namespace will result in mis-mapping the feature IDs

     [ https://issues.apache.org/jira/browse/TUSCANY-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fuhwei Lwo updated TUSCANY-1254:
--------------------------------

    Attachment: OpenTypeTest.java
                open2.xsd
                open.xsd

To reproduce the problem, you need to codegen open.xsd and open2.xsd before running OpenTypeTest.java. Below is the stack trace I got.

Exception in thread "main" java.lang.NullPointerException
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eOpenGet(BasicEObjectImpl.java:641)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:599)
	at org.apache.tuscany.sdo.impl.DataObjectImpl.get(DataObjectImpl.java:132)
	at org.apache.tuscany.sdo.util.DataObjectUtil.getList(DataObjectUtil.java:173)
	at org.apache.tuscany.sdo.impl.DataObjectImpl.getList(DataObjectImpl.java:995)
	at org.apache.tuscany.sdo.test.OpenTypeTest.main(OpenTypeTest.java:28)


> Codegen on a type inheriting from a type in different namespace will result in mis-mapping the feature IDs
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1254
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1254
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>         Environment: WinXP
>            Reporter: Fuhwei Lwo
>         Attachments: open.xsd, open2.xsd, OpenTypeTest.java
>
>
> Based on my observation, there are two sets of feature ID were generated for the Type - 1) ID numbering from EMF 2) ID numbering for SDO. This problem occurs when the child type was codegened, its IDs for SDO were mapped to those from EMF. So when you tried to get the property using dynamic API, since the feature ID is wrong, unpredictable exception will occur. The exception can be NPE or ClassCastException depending on the characteristic of the wrong ID.

-- 
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