Hi Frank,

The EMF Diagnostician validate() is generating a StackOverflowException which 
may be exposing a bug in the Tuscany SDO dynamic subclassing area. Here is the 
stack trace. Let me know if anything jumps out at you. BTW, I am currently 
using Tuscany SDO version R548343 and EMF 2.2.2. I plan upgrade to the final 
1.0 release when it is ready.

- Ron

java.lang.StackOverflowError
at mypackage.impl.MyFactoryImpl.getMyType(MyFactoryImpl.java:1135)


at mypackage.impl.MyTypeImpl.getStaticType(MyTypeImpl.java:821)
at 
org.apache.tuscany.sdo.impl.DataObjectBase.eStaticClass(DataObjectBase.java:378)
at 
org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl.eClass(ExtensibleDataObjectImpl.java:118)
at 
org.apache.tuscany.sdo.impl.ExtensibleDataObjectImpl.eDerivedStructuralFeatureID(ExtensibleDataObjectImlp.java:87)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectimpl.java:815)

at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DataObjectImpl.java:152)

at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DatObjectImpl.java:112)

at mypackage.sdo.impl.MyTypeImpl.setSet(MyTypeImpl.java:2005)


at org.apache.tuscany.sdo.impl.DataObjectBase.eIsSet(DataObjectBase.java:437)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectimpl.java:818)
at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DataObjectImpl.java:152)
at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DatObjectImpl.java:112)
...
at mypackage.sdo.impl.MyTypeImpl.setSet(MyTypeImpl.java:2005)

at org.apache.tuscany.sdo.impl.DataObjectBase.eIsSet(DataObjectBase.java:437)

at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectimpl.java:818)

at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DataObjectImpl.java:152)

at org.apache.tuscany.sdo.impl.DataObjectImpl.isSet(DatObjectImpl.java:112)

...

----- Original Message ----
From: Ron Gavlin <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, July 26, 2007 12:22:49 PM
Subject: Re: How to add Property to an XSDHelper-defined Type

Hi Frank,

The SDOUtil.createProperty() appears to do what I need with one caveat. I am 
currently using the EMF's Diagnostician to validate my DataObjects since 
Tuscany SDO does not directly offer such a capability. The Diagnostician throws 
an Exception when it encounters a DataObject whose type modified using 
SDOUtil.createProperty(). Any ideas off the top of your head why the 
Diagnostician might not like the DataObject with the modified type?

- Ron

----- Original Message ----
From: Frank Budinsky <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, July 26, 2007 9:50:26 AM
Subject: Re: How to add Property to an XSDHelper-defined Type

Hi Ron,

I guess we would need to make TypeHelper.define support a mode where you 
would only give a patial definition of a Type and it would be used as a 
delta to modify an exisitng type. 

A simpler approach, which may be working already, is to use the 
Tuscany-specific SDOUtil.createProperty() method to modify the existing 
type. Have you tried that?

Frank.

Ron Gavlin <[EMAIL PROTECTED]> wrote on 07/25/2007 05:16:44 PM:

> Yes, it would be inconvenient for me to use XSDHelper.define() to 
> modify the existing type. Allowing TypeHelper.define() to "redefine"
> the type would be much preferred. How would TypeHelperImpl need to 
> be changed to implement such a feature?
> 
> - Ron
> 
> ----- Original Message ----
> From: Frank Budinsky <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Wednesday, July 25, 2007 4:37:46 PM
> Subject: Re: How to add Property to an XSDHelper-defined Type
> 
> If you create your HelperContext using 
SDOUtil.createHelperContext(true), 
> XSDHelper.define() will then let you add new types to an existing 
> namespace and also to replace an existing type with a new version (Note: 

> this is a "use at your own risk" feature).
> 
> So, you could add a new property by calling XSDHelper.define() again 
> passing in a new version of the XSD type that includes the new 
> element/attribute. 
> 
> Maybe we should consider makingTypeHelper.define() also allow you to 
> modify existing types if the HelperContext has extensibleNamespaces == 
> true?
> 
> Frank.
> 
> 
> 
> 
> Ron Gavlin <[EMAIL PROTECTED]> 
> 07/25/2007 03:55 PM
> Please respond to
> [email protected]
> 
> 
> To
> tuscany-user tuscany-user <[email protected]>
> cc
> 
> Subject
> How to add Property to an XSDHelper-defined Type
> 
> 
> 
> 
> 
> 
> Greetings,
> 
> I have a Type that was created using XSDHelper.define(). Now I would 
like 
> to dynamically add an add'l Property to this Type. This does not appear 
to 
> be supported. Can you suggest any workarounds?
> 
> - Ron
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to