cancel
Showing results for 
Search instead for 
Did you mean: 

Error during conversion of data from driver JDBC to SAP HANA Database.

0 Kudos

Good day.

Currently we have an JAVA application that get data throught of driver JDBC ngdbc-2.4.67.jar from database

SAP HANA 2.00.044.00.1571081837. In most of the cases we have an error that indicate an overflow in array when the application is reading data and these are convert from format binary to string, int, or decimal. The detail about this problem is the next:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 7028547

at com.sap.db.util.ByteUtils.getUByte(ByteUtils.java:38) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf8d7c4]

at com.sap.db.jdbc.packet.HPart.getUByte(HPart.java:62) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf8d7c4]

at com.sap.db.jdbc.packet.HDataPart._getFieldLengthFromDataLengthIndicator(HDataPart.java:1127) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4\

615dae104ed3de580c64399b376bf8d7c4]

at com.sap.db.jdbc.packet.HDataPart._getFieldLength(HDataPart.java:1101) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399\

b376bf8d7c4]

at com.sap.db.jdbc.packet.HDataPart._nextField(HDataPart.java:1033) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376b\

f8d7c4]

at com.sap.db.jdbc.packet.HDataPart.nextRecord(HDataPart.java:281) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf\

8d7c4]

at com.sap.db.jdbc.FetchChunk.nextRow(FetchChunk.java:111) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf8d7c4]

at com.sap.db.jdbc.ResultSetSapDB._next(ResultSetSapDB.java:4624) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf8\

d7c4]

at com.sap.db.jdbc.ResultSetSapDB.next(ResultSetSapDB.java:157) ~[ngdbc-2.4.67.jar!/:2.4.67-3028d4615dae104ed3de580c64399b376bf8d7\

c4]

Can somebody help me with this problem?

Regards.

lbreddemann
Active Contributor
0 Kudos

Can you add code and data to reproduce the issue? Based on the stack backtrace my guess is that there is some corruption of the data on network level.

View Entire Topic
0 Kudos

Good day Lars.

An apoligy, I have been a little busy, I would like to tell you that until now the trace file has not been useful. We could found the solution to the problem.

On the other hand, I confirm you that the number 7028547 to corresponds to array´s index. in other tests, the value to fetchSize has been 250000 records, as the resultSet is of 1000000 of records.

For instance, I have just executed another test with another data set and the default fectchsize and the result was:

java.lang.ArrayIndexOutOfBoundsException: 90958
at com.sap.db.util.ByteUtils.getUByte(ByteUtils.java:38)
at com.sap.db.jdbc.packet.HPart.getUByte(HPart.java:62)
at com.sap.db.jdbc.packet.HDataPart._getFieldLengthFromDataLengthIndicator(HDataPart.java:1127)
at com.sap.db.jdbc.packet.HDataPart._getFieldLength(HDataPart.java:1101)
at com.sap.db.jdbc.packet.HDataPart._nextField(HDataPart.java:1033)
at com.sap.db.jdbc.packet.HDataPart.moveToField(HDataPart.java:304)
at com.sap.db.jdbc.ResultSetSapDB._getDataPart(ResultSetSapDB.java:4861)
at com.sap.db.jdbc.ResultSetSapDB.getNString(ResultSetSapDB.java:3370)

Will you have any comments?

Regards.

lbreddemann
Active Contributor
0 Kudos

Nope, I don't have any more comments here. This error occurs in the JDBC driver code where it re-assembles data from the HANA wire protocol back to JAVA data structures. To analyse this, the source code for the driver is required but only available to SAP's developers (i.e. not to me).

At this point, all I can advise is to follow up with the support incident and to see if leaving the fetchSize alone altogether would lead to the error to not occur.