db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kurt Huwig (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2549) ArrayIndexOutOfBoundsException in SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE
Date Wed, 18 Apr 2007 22:15:15 GMT

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

Kurt Huwig commented on DERBY-2549:
-----------------------------------

I just tried the replacement with batches of 2000 rows like this:

        int errorRow = 0;
l1:        while(true) {
    final ResultSet rs = stm.executeQuery("SELECT * FROM journal FOR UPDATE");
        for (int row = 1; rs.next(); row++) {
            if (row < errorRow) {
                continue;
            }
            update(rs, "ip");
            update(rs, "sender");
            update(rs, "recipient");
            update(rs, "mailsender");
            update(rs, "mailfrom");
            update(rs, "mailto");
            update(rs, "cc");
            update(rs, "bcc");
            update(rs, "replyto");
            update(rs, "subject");
            update(rs, "attachments");
            update(rs, "status");
            update(rs, "reason");
            rs.updateInt("totallength", 0);
            rs.updateDouble("spamscore", 0);
            rs.updateRow();
            if (row == errorRow + 2000) {
                errorRow = row;
                rs.close();
                continue l1;
            }
            
            if (row % 500 == 0) {
                System.out.println(row);
            }
        }
        break;
        }

but this only brought me up to 9500+. Then I tried it with closing the Statement and Connection
and recreating them after 2000 updates. This worked fine.

> ArrayIndexOutOfBoundsException in SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE
> -------------------------------------------------------------------------
>
>                 Key: DERBY-2549
>                 URL: https://issues.apache.org/jira/browse/DERBY-2549
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Linux 2.6.x, JRE 1.5.0_b7
>            Reporter: Kurt Huwig
>         Attachments: DerbyDiskSpaceDiag.java
>
>
> I am doing this in my code:
> CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('SPONTS','" + "journal".toUpperCase(Locale.US)
+ "',1,1,1)")
> ("journal" is actually a String-variable, but I replaced it here for easier understanding)
> Sometime - not always - I am getting this exception:
> java.sql.SQLException: The exception 'java.lang.ArrayIndexOutOfBoundsException: 100'
was thrown while evaluating an expression. SQLSTATE: XJ001:
> Java exception: '100: java.lang.ArrayIndexOutOfBoundsException'.
>         at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
>         at org.apache.derby.client.am.Statement.execute(Unknown Source)
> [...]
> Caused by: org.apache.derby.client.am.SqlException: The exception 'java.lang.ArrayIndexOutOfBoundsException:
100' was thrown while evaluating an expression.
>  SQLSTATE: XJ001: Java exception: '100: java.lang.ArrayIndexOutOfBoundsException'.
>         at org.apache.derby.client.am.Statement.completeExecute(Unknown Source)
>         at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown
Source)
>         at org.apache.derby.client.net.NetStatementReply.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.net.StatementReply.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.net.NetStatement.readExecuteCall_(Unknown Source)
>         at org.apache.derby.client.am.Statement.readExecuteCall(Unknown Source)
>         at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
>         at org.apache.derby.client.am.Statement.executeX(Unknown Source)
>         ... 12 more

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


Mime
View raw message