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

[jira] Created: (TUSCANY-1483) Static SDO generator: problem with elements named internal*

Static SDO generator: problem with elements named internal*
-----------------------------------------------------------

                 Key: TUSCANY-1483
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
             Project: Tuscany
          Issue Type: Improvement
          Components: Java SDO Tools
    Affects Versions: Java-SDO-beta1
            Reporter: Daniel Peter
            Priority: Minor
             Fix For: Java-SDO-Next


Hi,
I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
<xsd:element name="abc" type="xsd:integer" />
<xsd:element name="internalAbc" type="xsd:integer" />

In the generated Impl class this leads twice to the same constant INTERNAL_ABC.

The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
The generator could use a different, less probable prefix (e.g. ___INTERNAL_).

Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Amita Vadhavkar updated TUSCANY-1483:
-------------------------------------

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

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-1.1
>
>         Attachments: 1483-withTestCase.patch, 1483-withTestCaseInToolsTest.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

David T. Adcox updated TUSCANY-1483:
------------------------------------

    Attachment: 1483.patch

Following Frank's suggestion, I've modified the INTERNAL_ prefix to be _INTERNAL_.  Using the provided schema, the problem is resolved once this patch is applied.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Amita Vadhavkar updated TUSCANY-1483:
-------------------------------------

    Attachment: 1483-withTestCase.patch

test case added to patch

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483-withTestCase.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Amita Vadhavkar updated TUSCANY-1483:
-------------------------------------

    Attachment: 1483-withTestCaseInToolsTest.patch

Acted on previous comments.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483-withTestCase.patch, 1483-withTestCaseInToolsTest.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Amita Vadhavkar resolved TUSCANY-1483.
--------------------------------------

    Resolution: Fixed

patch applied at revision 615169

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483-withTestCase.patch, 1483-withTestCaseInToolsTest.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

David T. Adcox updated TUSCANY-1483:
------------------------------------

    Attachment: test1483.xsd

Here is a simply schema to use when testing this issue.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Frank Budinsky commented on TUSCANY-1483:
-----------------------------------------

I think that all that's necessary to make this change is globally replace "INTERNAL_" with "_INTERNAL_" in SDOClass.javajet and SDOFactory.javajet.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Kelvin Goodson commented on TUSCANY-1483:
-----------------------------------------

Amita,  thanks for looking at this.  A while back we moved nearly all of our generated class test cases out of the tools project into the tools-test project.  The reason for this is that generating classes in a build requires use of the plugin project,  but the plugin project relies on the tools project, so we couldn't add a test scope dependency of the tools project on the plugin one,  as there would then be circular dependencies.  The outcome is that we have an extra project,  with dependencies on both tools and plugin,  where nearly all the testing goes on.  The only test I left in the tools project itself was one that looked at package names,  and for that I bypassed the plugin.  The reason for this was that I could inspect runtime artifacts to ensure the behaviour,  instead of having into inspect files or jars if I had done the test using the plugin.

The upshot of this is that I think the behaviour in question for this JIRA is better tested in the tools-test project, where we can just add the schema to a stanza in the pom.xml,  and exercise the generated classes in a small test program.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483-withTestCase.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Kelvin Goodson commented on TUSCANY-1483:
-----------------------------------------

Your most recent patch ( 1483-withTestCaseInToolsTest.patch ) looks good by visual inspection.  I haven't applied it to a test environment.   Please feel free to commit it, and I'll check the commit log and run the tests after.

Kelvin.

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483-withTestCase.patch, 1483-withTestCaseInToolsTest.patch, 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

-- 
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-1483) Static SDO generator: problem with elements named internal*

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

Amita Vadhavkar commented on TUSCANY-1483:
------------------------------------------

Hi David, Please see http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg26335.html for example XSD with BiDi relation. I have not so far tried it
for this JIRA's issue by modifying property names etc., but may be useful.
Regards,
Amita

> Static SDO generator: problem with elements named internal*
> -----------------------------------------------------------
>
>                 Key: TUSCANY-1483
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1483
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-beta1
>            Reporter: Daniel Peter
>            Priority: Minor
>             Fix For: Java-SDO-Next
>
>         Attachments: 1483.patch, test1483.xsd
>
>
> Hi,
> I run into a problem with the static generated SDOs, when having a xsd with the following two elements:
> <xsd:element name="abc" type="xsd:integer" />
> <xsd:element name="internalAbc" type="xsd:integer" />
> In the generated Impl class this leads twice to the same constant INTERNAL_ABC.
> The xsd elements might simply be renamed in order to avoid this clash, but there might be situations where this is not possible. 
> The generator could use a different, less probable prefix (e.g. ___INTERNAL_).
> Thanks, Daniel.

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