db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EDAH-TALLY (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3038) SYSCS_IMPORT_TABLE FAILS : regression ?
Date Sun, 09 Sep 2007 20:29:29 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526022

EDAH-TALLY commented on DERBY-3038:


In fact, in a real application, I do not shutdown the DB at all except when 
ending the application.

I wrote Reproduce3038 this way because during development, I usually create 
the DB and the table, checks that the objects are here from OpenOffice Base, 
then in a distinct run(which may be on some other day) I would import the 
data. That's why I closed the DB between each step in Reproduce3038, to mimic 
real time development steps. Any way, in production, a user would import a 
file on existing objects.

As I commented in Main.java, if the data is imported in a distinct run on 
existing objects, it fails. If in one same run, the DB and the table are 
created AND the data is imported, then import succeeds.

I also removed the shutdown database instruction and failure persists in the same circumstances.

Thank you for the 'Class.forName' comment.

One more note, I get the same result with 10.2.

Thank you.

> ------------------------------------------------
>                 Key: DERBY-3038
>                 URL: https://issues.apache.org/jira/browse/DERBY-3038
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions:
>         Environment: Linux #2 Tue Jun 26 23:24:34 CEST 2007 i686 AMD Athlon(tm)
XP 2800+ GNU/Linux (Mandriva 2007 Spring)
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
> Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
>            Reporter: EDAH-TALLY
>         Attachments: create_table.txt, lst_pays.csv, Reproduce3038.zip, stacktrace.txt,
sysinfo.txt, Test3038.java
> I used to import data with CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE procedure with 
> success in JAVA and DERBY
> Since, the import procedure fails.
> The error message is : 
> The exception 'java.sql.SQLException: No current connection.' was thrown while 
> evaluating an expression.
> I'm sure there is a connection, the same which created the statement : 
> ***************************************************************************************************
>     protected boolean importTableDataCOUNTRIES() {
>         try {
>             java.sql.Statement st = 
> conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, 
> java.sql.ResultSet.CONCUR_UPDATABLE);
>             String sql = "";
>             sql = "CALL 
> SYSCS_UTIL.SYSCS_IMPORT_TABLE('NMSET', 'PAYS', '/tmp/lst_pays.csv', 
> null, null, null, 1)";
>             st.executeUpdate(sql);
>             return true;
>         } catch (SQLException ex) {
>             debug(ex.getMessage());
>         }
>         return false;
>     }
> ***************************************************************************************************
> The database is not being accessed by another application. The table does 
> exist. The CSV file is comma separated and strings are enclosed by ".
> Thank you for considering this issue.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message