[ http://issues.apache.org/jira/browse/DERBY-1727?page=comments#action_12431242 ] Kristian Waagan commented on DERBY-1727: ----------------------------------------
I checked this out, since I have worked in the area of the code showing the error. My conclusion is that this is a problem with JIT in the IBM 1.3.1 (SR10) JDK. When I turned off JIT, the test ran successfully. The NullPointerExceptions is seemingly caused by the variable 'buffer' being nulled out/garbage collected too early. The error occurs at the second last iteration of the loop. As a side note, the error also disappeared when I added a System.out.println in a specific location of the code... As reported above, I also saw two different kinds of errors; ArrayIndexOutOfBounds and NullPointerException. My take on this would be to close the isse with "Won't fix"/"Invalid" and recommend that users update to a newer JDK. > Test lang/streams.java fails with ArrayIndexOutOfBoundsException using IBM > JDK 1.3.1 SR10 > ----------------------------------------------------------------------------------------- > > Key: DERBY-1727 > URL: http://issues.apache.org/jira/browse/DERBY-1727 > Project: Derby > Issue Type: Bug > Affects Versions: 10.2.1.0 > Environment: Linux SLES 9 and WIndows 2003 Server running IBM 1.3.1 > JVM: build cxia32131-20060605 (SR10) > Reporter: Stan Bradbury > Priority: Minor > > Test fails with stack trace in the derby log of: > 2006-08-15 21:45:06.825 GMT Thread[main,5,main] (XID = 147), (SESSIONID = 0), > (D > ATABASE = wombat), (DRDAID = null), Failed Statement is: insert into t1 > values( > ?, ?, ?,?) > java.lang.ArrayIndexOutOfBoundsException: 136019356 > . . .iapi.types.ReaderToUTF8Stream.fillBuffer(Unk)(Compiled Code) > . . .iapi.types.ReaderToUTF8Stream.read(Unk) > at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:309) > . . .iapi.types.SQLChar.readExternal(Unk) > . . .iapi.types.SQLChar.getString(Unk)(Compiled Code) > . . .iapi.types.SQLVarchar.normalize(Unk) > . . .iapi.types.DataTypeDescriptor.normalize(Unk) > . . .impl.sql.execute.NormalizeResultSet.normalizeRow(Unk) > . . .impl.sql.execute.NormalizeResultSet.getNextRowCore(Unk) > . . .impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unk) > . . .impl.sql.execute.InsertResultSet.open(Unk) > . . .impl.sql.GenericPreparedStatement.execute(Unk) > . . .impl.jdbc.EmbedStatement.executeStatement(Unk) > . . .impl.jdbc.EmbedPreparedStatement.executeStatement(Unk) > . . .impl.jdbc.EmbedPreparedStatement.executeUpdate(Unk) > . . Testing.functionTests.tests.lang.streams.insertLongString(Unk) > . . Testing.functionTests.tests.lang.streams.doWork(Unk) > . . Testing.functionTests.tests.lang.streams.main(Unk) > Cleanup action completed > === Found similar report from 10.1 testing - Exception differs from the above: > The test lang/streams.java fails with ibm131 jvm > with NullPointerException. There is no stack in test output, > but derby.log has this: > ------------------ > java.lang.NullPointerException > at > org.apache.derby.impl.jdbc.ReaderToUTF8Stream.fillBuffer(ReaderToUTF8Stream.java(Compiled > Code)) > org.apache.derby.impl.jdbc.ReaderToUTF8Stream.read(ReaderToUTF8Stream.java) > java.io.DataInputStream.readUnsignedShort(DataInputStream.java:309) > org.apache.derby.iapi.types.SQLChar.readExternal(SQLChar.java) > org.apache.derby.iapi.types.SQLChar.getString(SQLChar.java(Compiled Code)) > org.apache.derby.iapi.types.SQLVarchar.normalize(SQLVarchar.java) > org.apache.derby.iapi.types.DataTypeDescriptor.normalize(DataTypeDescriptor.java) > org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(NormalizeResultSet.java) > org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java) > org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java) > org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java) > org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java) > org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java) > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java) > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java) > org.apache.derbyTesting.functionTests.tests.lang.streams.insertLongString(streams.java) > org.apache.derbyTesting.functionTests.tests.lang.streams.doWork(streams.java) > org.apache.derbyTesting.functionTests.tests.lang.streams.main(streams.java) > ------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira