You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Chris Mildebrandt (JIRA)" <tu...@ws.apache.org> on 2007/09/20 20:30:31 UTC

[jira] Created: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

[JAVA-SDO] Incorrect generation of class with default value for a list
----------------------------------------------------------------------

                 Key: TUSCANY-1780
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Tools
    Affects Versions: Java-SDO-1.0, Java-SDO-Next
         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
            Reporter: Chris Mildebrandt
            Priority: Critical


Hello,

There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:

<xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>

<simpleType name="CategoryType">
    <list itemType="category" />
</simpleType>

This generates the following line in the impl class:

protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");

The class ModelPackageImpl doesn't exist.

I've tried this with the 1.0 version of SDO and a version I built today.

Let me know if you need any more information. Thanks,
-Chris

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


[jira] Commented: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536432 ] 

Kelvin Goodson commented on TUSCANY-1780:
-----------------------------------------

Here's what the generator should be generating I think.

protected static final List CATEGORY_TYPE_DEFAULT_ =
		(List)((XsdlistwitdefaultFactoryImpl)XsdlistwitdefaultFactory.INSTANCE).createFromString(XsdlistwitdefaultFactoryImpl.CATEGORY_TYPE, "myCat");


> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>         Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Updated: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Amita Vadhavkar (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amita Vadhavkar updated TUSCANY-1780:
-------------------------------------

    Fix Version/s:     (was: Java-SDO-Next)
                   Java-SDO-1.1

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-1.1
>
>         Attachments: Address.xsd, Address2.xsd, SDOClass.java
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Commented: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530562 ] 

Frank Budinsky commented on TUSCANY-1780:
-----------------------------------------

This seems to be a part of the Class.javajet template that was overlooked when we changed to generate the new noEMF pattern.

The template needs to be changed to generate the following:

	protected static final List CATEGORY_TYPE_DEFAULT_ = (List)((AddressFactoryImpl)AddressFactory.INSTANCE).createCategoryTypeFromString("myCat");

instead of what it's currently generating:

	protected static final List CATEGORY_TYPE_DEFAULT_ = (List)((EFactory)AddressFactory.INSTANCE).createFromString(AddressPackageImpl.eINSTANCE.getCategoryType(), "myCat");

A temporary workagound is to change it by hand after generating.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>         Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Updated: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Chris Mildebrandt (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Mildebrandt updated TUSCANY-1780:
---------------------------------------

    Attachment: Address.xsd

I've attached my test schema which was referred to in my description. The actual schema I'm concerned about can be found here: 

http://www.oasis-open.org/apps/group_public/download.php/25369/FullSchema.zip

It's the wd-sdd-packageDescriptor-1.0.xsd in the zip file that has the same problem as the attached schema. 

Let me know if you need anything else. Thanks,
-Chris

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>         Attachments: Address.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Commented: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537012 ] 

Frank Budinsky commented on TUSCANY-1780:
-----------------------------------------

I'd suggest replacing this:

 stringBuffer.append(genFeature.getStaticDefaultValue()); 

with something like this:

 stringBuffer.append(SDOGenUtil.getStaticDefaultValue(genFeature)); 

Then you can implement SDOGenUtil.getStaticDefaultValue() to produce only what is needed for SDO.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>         Attachments: Address.xsd, Address2.xsd, SDOClass.java
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Issue Comment Edited: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536432 ] 

kgoodson edited comment on TUSCANY-1780 at 10/20/07 6:46 AM:
-------------------------------------------------------------------

Commented in error

      was (Author: kgoodson):
    Here's what the generator should be generating I think.

protected static final List CATEGORY_TYPE_DEFAULT_ =
		(List)((XsdlistwitdefaultFactoryImpl)XsdlistwitdefaultFactory.INSTANCE).createFromString(XsdlistwitdefaultFactoryImpl.CATEGORY_TYPE, "myCat");

  
> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>         Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Updated: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson updated TUSCANY-1780:
------------------------------------

    Attachment: SDOClass.java

As a checkpoint in investigating this issue I'm attaching a sanitised version of SDOClass.java  for debug purposes which is logically equivalent to the status quo.

Here's where I've got to --- At line 530 of this file we create the static defaults of variables,  be they single instance or list type.  So the one call to 
	stringBuffer.append(genFeature.getStaticDefaultValue());
is used to handle thing like

protected static final String VALUE_DEFAULT_ = null;
protected static final boolean DISPLAYABLE_DEFAULT_ = false;

as well as the case in hand.

The differential logic for creating the string is found in guarded code portions of GenDataTypeImpl#getStaticValue (as reached from GenFeatureImpl#getStaticDefaultValue()) and it is there that the "createFromString" code that is in error is generated.

The problem as I see it at the moment is that all that logic is bound up in one single EMF method, containing some code that I want,  and some that I don't.

It's not clear to me at the moment whether I need to add guards into SDOClass which replicate the fairly detailed logic in the calling stack  to avoid the call to getFeature.getStaticDefaultValue() in the circumstances when it produces the erroneous code (providing an alternative generation in those circumstances),  or whether there is some better means of influencing the output.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>         Attachments: Address.xsd, Address2.xsd, SDOClass.java
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Commented: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "David T. Adcox (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529307 ] 

David T. Adcox commented on TUSCANY-1780:
-----------------------------------------

Chris,

I've performed a quick sniff test of this, and I'm not seeing the same behavior.  Perhaps you could attach the full schema that is causing your problem (or an abbreviated one would be nice).  I may not have things structured as you do, so using your copy would be best.

Thanks,
David

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Resolved: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson resolved TUSCANY-1780.
-------------------------------------

    Resolution: Fixed

Resolved in 588261.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>             Fix For: Java-SDO-Next
>
>         Attachments: Address.xsd, Address2.xsd, SDOClass.java
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Updated: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson updated TUSCANY-1780:
------------------------------------

    Patch Info: [Patch Available]

Franks comment represents a fix - so setting patch available flag.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>         Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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


[jira] Updated: (TUSCANY-1780) [JAVA-SDO] Incorrect generation of class with default value for a list

Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Budinsky updated TUSCANY-1780:
------------------------------------

    Attachment: Address2.xsd

The Address.xsd schema has a few errors. I'm attaching Address2.xsd, which is a valid schema illustrating the problem.

> [JAVA-SDO] Incorrect generation of class with default value for a list
> ----------------------------------------------------------------------
>
>                 Key: TUSCANY-1780
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1780
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0, Java-SDO-Next
>         Environment: Windows XP, JRE 1.4.2 and JRE 1.5
>            Reporter: Chris Mildebrandt
>            Priority: Critical
>         Attachments: Address.xsd, Address2.xsd
>
>
> Hello,
> There seems to be a problem when generating static classes when lists are involved. I have the following lines in my schema:
> <xsd:attribute name="categoryType" type="address:CategoryType" use="required" default="myCat"/>
> <simpleType name="CategoryType">
>     <list itemType="category" />
> </simpleType>
> This generates the following line in the impl class:
> protected static final Object CATEGORY_TYPE_DEFAULT_ = ((EFactory)ModelFactory.INSTANCE).createFromString(ModelPackageImpl.eINSTANCE.getObject(), "myCat");
> The class ModelPackageImpl doesn't exist.
> I've tried this with the 1.0 version of SDO and a version I built today.
> Let me know if you need any more information. Thanks,
> -Chris

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