You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Ronny Völker (JIRA)" <ji...@apache.org> on 2007/01/12 17:25:27 UTC

[jira] Created: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
-------------------------------------------------------------------------------------

                 Key: TORQUE-76
                 URL: https://issues.apache.org/jira/browse/TORQUE-76
             Project: Torque
          Issue Type: Bug
          Components: Generator
    Affects Versions: 3.3-RC1
            Reporter: Ronny Völker
             Fix For: 3.3, 4.0


When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
When compiling with Torque3.2 everything is compiled successfully.

The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.

Sample compilation output:
    [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
    [javac] found   : org.tigris.scarab.om.Module
    [javac] required: org.tigris.scarab.om.ScarabModule
    [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
    
The buggy line using Torque3.3rc1 templates:
Issue temp_obj1 = (Issue) results.get(j);
ScarabModule temp_obj2 = temp_obj1.getModule();

The sameline using Torque3.2 templates:
Issue temp_obj1 = (Issue) results.get(j);
ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();

The interface of Issue.getModule() (inherited from BaseIssue):
    public Module getModule()

The related sections in the schema.xml of Scarab:
<table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
    baseClass="org.tigris.scarab.om.AbstractScarabModule"
    interface="Module">
...
    
<table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
...
    <column name="MODULE_ID" required="true" type="INTEGER"></column>

    <foreign-key foreignTable="SCARAB_MODULE">
        <reference local="MODULE_ID" foreign="MODULE_ID"/>
    </foreign-key>
...


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Closed: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl closed TORQUE-76.
--------------------------------


> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3
>
>         Attachments: torque-76-testcase.zip
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

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


[jira] Resolved: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl resolved TORQUE-76.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 4.0)

Fixed in SVN. Ronny, would you please check out the latest trunk to make sure everything works ok?

> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3
>
>         Attachments: torque-76-testcase.zip
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

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


[jira] Assigned: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl reassigned TORQUE-76:
------------------------------------

    Assignee: Thomas Vandahl

> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3, 4.0
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Ronny Völker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470659 ] 

Ronny Völker commented on TORQUE-76:
------------------------------------

Is there some kind of nightly build available, that can be downloaded?
I tried to compile the trunk from sources, but maven returns a lot of errors while downloading the dependencies and I could not yet figure out the reason for that.
As a workaround I replaced the changed *.vm files in torque-gen-templates-3.3-RC1.jar directly, but this did no work either: The generated Scarab-classes had compilation errors.

> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3
>
>         Attachments: torque-76-testcase.zip
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

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


[jira] Commented: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465780 ] 

Thomas Vandahl commented on TORQUE-76:
--------------------------------------

Please note that the documentation of the "interface" attribute of the <table> element has changed to allow more generic use of interfaces. This may have an influence on the behaviour you observe.

Taking the changes back is not a real problem, but I'd like to avoid such things in the future. Could you please provide a stripped-down test case?

> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3, 4.0
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-76) broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Posted by "Ronny Völker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronny Völker updated TORQUE-76:
-------------------------------

    Attachment: torque-76-testcase.zip

The attached zip contains some stripped down source files  of scarab. They should be sufficient reproduce this bug. Please let me know, if something is missing.
(Sorry for my late answer, I was really short of time in the last days.)

> broken combatibility to 3.2: incompatible types error when compiling BasePeer classes
> -------------------------------------------------------------------------------------
>
>                 Key: TORQUE-76
>                 URL: https://issues.apache.org/jira/browse/TORQUE-76
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.3-RC1
>            Reporter: Ronny Völker
>         Assigned To: Thomas Vandahl
>             Fix For: 3.3, 4.0
>
>         Attachments: torque-76-testcase.zip
>
>
> When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
> When compiling with Torque3.2 everything is compiled successfully.
> The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
> In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.
> Sample compilation output:
>     [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
>     [javac] found   : org.tigris.scarab.om.Module
>     [javac] required: org.tigris.scarab.om.ScarabModule
>     [javac]                 ScarabModule temp_obj2 = temp_obj1.getModule();
>     
> The buggy line using Torque3.3rc1 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = temp_obj1.getModule();
> The sameline using Torque3.2 templates:
> Issue temp_obj1 = (Issue) results.get(j);
> ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();
> The interface of Issue.getModule() (inherited from BaseIssue):
>     public Module getModule()
> The related sections in the schema.xml of Scarab:
> <table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule" 
>     baseClass="org.tigris.scarab.om.AbstractScarabModule"
>     interface="Module">
> ...
>     
> <table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
> ...
>     <column name="MODULE_ID" required="true" type="INTEGER"></column>
>     <foreign-key foreignTable="SCARAB_MODULE">
>         <reference local="MODULE_ID" foreign="MODULE_ID"/>
>     </foreign-key>
> ...

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