Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 96054 invoked from network); 11 Apr 2007 07:17:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2007 07:17:54 -0000 Received: (qmail 32966 invoked by uid 500); 11 Apr 2007 07:17:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 32942 invoked by uid 500); 11 Apr 2007 07:17:59 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 32931 invoked by uid 99); 11 Apr 2007 07:17:59 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 00:17:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 00:17:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6FC8371407B for ; Wed, 11 Apr 2007 00:17:32 -0700 (PDT) Message-ID: <15485385.1176275852454.JavaMail.jira@brutus> Date: Wed, 11 Apr 2007 00:17:32 -0700 (PDT) From: "Aaron Digulla (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2193) [import] ERROR 38000: StringIndexOutOfBoundsException was thrown while evaluating an expression. In-Reply-To: <23669833.1166455822640.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488008 ] Aaron Digulla commented on DERBY-2193: -------------------------------------- This resolves the minor issue in my case. My main problem is that I get no information where an error during an import occurred. The exception should contain at least the filename and the line number. If that is not available, please throw a wrapped exception with the whole record in getNextRowCore(). > [import] ERROR 38000: StringIndexOutOfBoundsException was thrown while evaluating an expression. > ------------------------------------------------------------------------------------------------ > > Key: DERBY-2193 > URL: https://issues.apache.org/jira/browse/DERBY-2193 > Project: Derby > Issue Type: Bug > Components: Tools > Affects Versions: 10.2.1.6 > Reporter: Aaron Digulla > Attachments: derby-2193-01.diff, derby-2193-script.jar > > > During import of a file, I get this error: > ERROR 38000: The exception 'java.sql.SQLException: Java exception: 'java.lang.StringIndexOutOfBoundsException: String index out of range: -14'.' was thrown while evaluating an expression. > at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > at org.apache.derby.iapi.error.StandardException.unexpectedUserException(Unknown Source) > at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source) > at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) > ... > How am I supposed to find what's wrong in a big import? :-) It should at least mention the file which I was importing, the row and the column when the error occurred. > After printing the whole exceptions chain, I got these additional two: > ERROR XJ001: Java exception: 'java.lang.StringIndexOutOfBoundsException: String index out of range: -14'. > at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > at org.apache.derby.iapi.error.StandardException.plainWrapException(Unknown Source) > at org.apache.derby.impl.load.LoadError.unexpectedError(Unknown Source) > at org.apache.derby.impl.load.ImportAbstract.next(Unknown Source) > at org.apache.derby.impl.sql.execute.VTIResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.NoPutResultSetImpl.getNextRowFromRowSource(Unknown Source) > at org.apache.derby.impl.store.access.heap.HeapController.load(Unknown Source) > at org.apache.derby.impl.store.access.heap.Heap.load(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.loadConglomerate(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.recreateAndLoadConglomerate(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.createAndLoadConglomerate(Unknown Source) > at org.apache.derby.impl.sql.execute.InsertResultSet.bulkInsertCore(Unknown Source) > at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) > at org.apache.derby.impl.load.Import.performImport(Unknown Source) > at org.apache.derby.impl.load.Import.importData(Unknown Source) > at org.apache.derby.catalog.SystemProcedures.SYSCS_IMPORT_DATA(Unknown Source) > at org.apache.derby.exe.ac07170079x010fx9622xb7bax00000011a6e80.g0(Unknown Source) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown Source) > at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(Unknown Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) > ... > java.lang.StringIndexOutOfBoundsException: String index out of range: -14 > at java.lang.String.(String.java:202) > at org.apache.derby.impl.load.ImportReadData.readNextDelimitedRow(Unknown Source) > at org.apache.derby.impl.load.ImportReadData.readNextRow(Unknown Source) > at org.apache.derby.impl.load.ImportAbstract.next(Unknown Source) > at org.apache.derby.impl.sql.execute.VTIResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source) > at org.apache.derby.impl.sql.execute.NoPutResultSetImpl.getNextRowFromRowSource(Unknown Source) > at org.apache.derby.impl.store.access.heap.HeapController.load(Unknown Source) > at org.apache.derby.impl.store.access.heap.Heap.load(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.loadConglomerate(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.recreateAndLoadConglomerate(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.createAndLoadConglomerate(Unknown Source) > at org.apache.derby.impl.sql.execute.InsertResultSet.bulkInsertCore(Unknown Source) > at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) > at org.apache.derby.impl.load.Import.performImport(Unknown Source) > at org.apache.derby.impl.load.Import.importData(Unknown Source) > at org.apache.derby.catalog.SystemProcedures.SYSCS_IMPORT_DATA(Unknown Source) > ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.