You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Patty Parker (JIRA)" <ji...@apache.org> on 2007/05/11 23:18:15 UTC

[jira] Created: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Bulk data load utility should indicate when it is finished.
-----------------------------------------------------------

                 Key: DERBY-2639
                 URL: https://issues.apache.org/jira/browse/DERBY-2639
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.2.2.0
         Environment: Java Version:    1.5.0_06
Java Vendor:     Sun Microsystems Inc.
OS name:         Windows XP
IDE:  Eclipse
Derby:  10.2.2,  running Embedded


            Reporter: Patty Parker


The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  

An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.

For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.



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


[jira] Commented: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Posted by "Carl-Erik Kopseng (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860176#action_12860176 ] 

Carl-Erik Kopseng commented on DERBY-2639:
------------------------------------------

@Knut Anders Hatlen 
You are indeed right, Knut, as that explains the errors as well as fixes them. I never thought I would be so glad to be proven wrong! I falsely assumed the con.close() would do what <code>DriverManager.getConnection("jdbc:derby:testdb;shutdown=true"); </code> does, but I was obviously mistaken. Maybe this will come in handy for someone else someday. 

Tusen takk :)

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>         Attachments: crashderby_src.zip, DerbyProblem.jar
>
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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


[jira] Commented: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860164#action_12860164 ] 

Knut Anders Hatlen commented on DERBY-2639:
-------------------------------------------

Thanks for providing the repro, Carl-Erik. I may be misunderstanding something, but here's what it seems to do:

Repeat 4 times:

1) Delete the directory testdb

2) Connect to the database testdb, create if it doesn't exist

3) create tables

4) drop tables

5) commit

I don't think this is valid usage, since the second iteration will delete a database that's currently booted. When you reconnect, you won't create a new database, but instead connect to the deleted database. This may work fine as long as you only access the data that was cached in memory before the database was deleted, but once you need to access the deleted data on the disk, Derby will (correctly) raise container not found exceptions.

If you insert this code in tearDown() after con.close(), it should work as you expect:

try {
    DriverManager.getConnection("jdbc:derby:testdb;shutdown=true");
} catch (SQLException sqle) {
    // ignore expected shutdown exception
}

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>         Attachments: crashderby_src.zip, DerbyProblem.jar
>
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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


[jira] Updated: (DERBY-2639) Bulk data load utility should indicate when it is finished.

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

Mike Matrigali updated DERBY-2639:
----------------------------------


I took a quick look at the import code and can't see how the statement could return before it was finished.  The
error has more of the feel of a bad invalidation of whatever the second query you are running.  Knowing exactly
how this second query is synchonized with import returning may help understand what is causing the error. 

Can you perhaps provide a standalone example of the code that reproduces this issue?

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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


[jira] Commented: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495208 ] 

Daniel John Debrunner commented on DERBY-2639:
----------------------------------------------

There seem to be a couple of bugs here:
  1) the procedure should not return before it has finished.
  2) the container not found exceptions should not occur regardless of if the load has finished or not.

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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


[jira] Updated: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel John Debrunner updated DERBY-2639:
-----------------------------------------

    Component/s: Store

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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


[jira] Updated: (DERBY-2639) Bulk data load utility should indicate when it is finished.

Posted by "Carl-Erik Kopseng (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carl-Erik Kopseng updated DERBY-2639:
-------------------------------------

    Attachment: crashderby_src.zip

This exact bug  has been driving me nuts for two days. I find it hard to understand why practically no one else seems to have come across this. After long hours of trying to debug this I have stripped the code to the bare minimum to expose the bug consistently. 

The code in crashderby_src.zip contains a Java source code file along with two sql files. It is a JUnit test case and needs the junit4.jar as well as the derby.jar. 

Example (Linux):  java -cp .:`locate /java/junit4.jar`:`locate lib/derby.jar`  org.junit.runner.JUnitCore CrashDerby

> Bulk data load utility should indicate when it is finished.
> -----------------------------------------------------------
>
>                 Key: DERBY-2639
>                 URL: https://issues.apache.org/jira/browse/DERBY-2639
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Version:    1.5.0_06
> Java Vendor:     Sun Microsystems Inc.
> OS name:         Windows XP
> IDE:  Eclipse
> Derby:  10.2.2,  running Embedded
>            Reporter: Patty Parker
>         Attachments: crashderby_src.zip, DerbyProblem.jar
>
>
> The bulk load CALL SYSCS_UTIL.SYSCS_IMPORT_DATA  appears to be finished (i.e. the statement returns), but it is not entirely 
> finishing before I try to query the table it is populating.  I would expect to get a locking exception, or something of that nature, but 
> the error I get is either SQLERROR XSCB1  or SQLERROR XSCBH1, Container <containerName> not found.  It has given me both at different times.  
> An improvement I would suggest is having SYSCS_UTIL.SYSCS_IMPORT_DATA indicate when it is done loading.  As it stands now, the thread I have running it finishes before the utility finishes, and I have no elegant way of knowing when the load is done, other than trying to use the table and trapping for I listed above.
> For more information, please see the post "SQL Exception: Container xxx not found" in derby-user mail list.

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