Hi, the JDBC driver you are using seems to be out-of-date. Please try a newer driver available at: http://dev.mysql.com/downloads/maxdb/clients.html
Please let me know if this solves your the problem. Regards, Marco ---------------------------------------------- Marco PASKAMP SAP DB, SAP Labs Berlin -----Original Message----- From: Michael Seidel [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 22. September 2004 19:15 To: [EMAIL PROTECTED] Subject: ArrayIndexOutOfBounds error when writting blob data... Hi, We're using SAPDB 7.3.0 Build 040-000-091-773 on JBoss 3.2.x and the following JDBC Driver (sapdb-jdbc-bin-7.4.03.06a.jar) Problem: ArrayIndexOutOfBoundsException while updating a table containing two blobs in a row, a timestamp and two strings (varchar) The Code: PreparedStatement ps = connection.prepareStatement( "UPDATE tablename " "SET blobField1=?, blobField2=?, timeStampField=?, strField=? " "WHERE ...." ); ByteArrayInputStream stream1 = new ByteArrayInputStream(byteArray1); ps.setBinaryStream(1, stream1, byteArray1.length); ByteArrayInputStream stream2 = new ByteArrayInputStream(byteArray2); ps.setBinaryStream(2, stream2, byteArray2.length); ... and so on ps.executeUpdate(); We get sometimes ArrayIndexOutOfBoundsException, when the statement is executed. Here the stacktrace from the JBoss console. java.lang.ArrayIndexOutOfBoundsException: 32345 at com.sap.dbtech.util.StructuredBytes.putInt2(StructuredBytes.java:461) at com.sap.dbtech.jdbc.packet.RequestPacket.initSegment(RequestPacket.java:528) at com.sap.dbtech.jdbc.packet.RequestPacket.newSegment(RequestPacket.java:584) at com.sap.dbtech.jdbc.packet.RequestPacket.dropPid(RequestPacket.java:252) at com.sap.dbtech.util.GarbageParseid.packetAction(GarbageParseid.java:36) at com.sap.dbtech.util.GarbageCan.emptyCan(GarbageCan.java:74) at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:338) at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:302) at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.ja va:381) at com.sap.dbtech.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.ja va:291) at com.sap.dbtech.jdbc.CallableStatementSapDB.executeUpdate(CallableStatementSa pDB.java:676) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(Wrapp edPreparedStatement.java:335) Is it a known bug? Is there any workaround for it out there? It seems, the driver tries to read outside the bounds of the blob data. Thanks, Michael -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
