You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by bu...@apache.org on 2002/02/08 18:25:55 UTC

DO NOT REPLY [Bug 6333] New: - Class TorqueJDBCTransformTask doesn't close Oracle ResultSet

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6333>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6333

Class TorqueJDBCTransformTask doesn't close Oracle ResultSet

           Summary: Class TorqueJDBCTransformTask doesn't close Oracle
                    ResultSet
           Product: Turbine
           Version: 2.1 final
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Torque
        AssignedTo: turbine-dev@jakarta.apache.org
        ReportedBy: ronant@infogain.co.uk
                CC: ronant@infogain.co.uk


Hello,
I've downloaded Turbine2.1 to reverse engineer an Oracle8.1.6 schema in XML,
and the following code reports the following error :
ORA-1000 Maximum open cursors exceeded.

public class TestReverseXML
{
    public static void main(String[] args) {
        TurbineConfig tc = new TurbineConfig("/home/ronant/torque",
          "TurbineResources.properties");
        tc.init();

        TorqueJDBCTransformTask txml = new TorqueJDBCTransformTask();
        txml.setDbDriver("oracle.jdbc.driver.OracleDriver");
        txml.setDbUrl("jdbc:oracle:thin:@SherKhan:1521:FSTART");
        txml.setDbUser("cy_schema");
        txml.setDbPassword("cy_schema");
        txml.setOutputFile("/home/ronant/torque/cy-schema.xml");
        try {
            txml.execute();
            txml.generateXML();
        } catch (Exception x)
        {
            System.out.println("Error in TestReverseXML : " + x.toString());
        }
    }
}

The fix I found is to actually close the ResultSet in the methods
getTableNames, getColumns, getPrimaryKeys, and getForeignKeys.

Besides, the <column> tags generated in the XML have an empty type attribute, like :
<table name="AIRLINES">
        <column name="AL_CODE" size="10" type=""/>
        <column name="AL_NAME" size="50" type=""/>
        <column name="AL_SHORTNAME" size="30" type=""/>
        <column name="AL_CODE" size="10" type=""/>
        <column name="AL_NAME" size="50" type=""/>
        <column name="AL_SHORTNAME" size="30" type=""/>
    </table>
which is annoying :)

Cheers,

Ronan Tanguy

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: DO NOT REPLY [Bug 6333] New: - Class TorqueJDBCTransformTask doesn't close Oracle ResultSet

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Did someone point out that this was fixed in CVS?  If so, let me know
and I'll close it.

Thanks, Dan


bugzilla@apache.org writes:

> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6333>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
> INSERTED IN THE BUG DATABASE.
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6333
>
> Class TorqueJDBCTransformTask doesn't close Oracle ResultSet
>
>            Summary: Class TorqueJDBCTransformTask doesn't close Oracle
>                     ResultSet
>            Product: Turbine
>            Version: 2.1 final
>           Platform: All
>         OS/Version: Linux
>             Status: NEW
>           Severity: Normal
>           Priority: Other
>          Component: Torque
>         AssignedTo: turbine-dev@jakarta.apache.org
>         ReportedBy: ronant@infogain.co.uk
>                 CC: ronant@infogain.co.uk
>
>
> Hello,
> I've downloaded Turbine2.1 to reverse engineer an Oracle8.1.6 schema in XML,
> and the following code reports the following error :
> ORA-1000 Maximum open cursors exceeded.
>
> public class TestReverseXML
> {
>     public static void main(String[] args) {
>         TurbineConfig tc = new TurbineConfig("/home/ronant/torque",
>           "TurbineResources.properties");
>         tc.init();
>
>         TorqueJDBCTransformTask txml = new TorqueJDBCTransformTask();
>         txml.setDbDriver("oracle.jdbc.driver.OracleDriver");
>         txml.setDbUrl("jdbc:oracle:thin:@SherKhan:1521:FSTART");
>         txml.setDbUser("cy_schema");
>         txml.setDbPassword("cy_schema");
>         txml.setOutputFile("/home/ronant/torque/cy-schema.xml");
>         try {
>             txml.execute();
>             txml.generateXML();
>         } catch (Exception x)
>         {
>             System.out.println("Error in TestReverseXML : " + x.toString());
>         }
>     }
> }
>
> The fix I found is to actually close the ResultSet in the methods
> getTableNames, getColumns, getPrimaryKeys, and getForeignKeys.
>
> Besides, the <column> tags generated in the XML have an empty type attribute, like :
> <table name="AIRLINES">
>         <column name="AL_CODE" size="10" type=""/>
>         <column name="AL_NAME" size="50" type=""/>
>         <column name="AL_SHORTNAME" size="30" type=""/>
>         <column name="AL_CODE" size="10" type=""/>
>         <column name="AL_NAME" size="50" type=""/>
>         <column name="AL_SHORTNAME" size="30" type=""/>
>     </table>
> which is annoying :)
>
> Cheers,
>
> Ronan Tanguy
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>