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

Lars, thanks a lot for your reply.

To clarify some things, effectively, I implemented a mechanism to page millions of records and avoid consume much JVM´s memory. So far, I do not have problems with the params to get the information in each page that is requested. To control this I use the params "limit" and "offset" in the query.

On the other hand, I realized a test changed the implementation about how the application connects to database, I mean, I used only the API Java JDBC (without use Spring JDBC Template) and the result was de same (Caused by: java.lang.ArrayIndexOutOfBoundsException: 7028547). In addition, with the implementation that use Spring JDBC Template, I realized a test without specify the fetch value, in other words, using the default value, but I got same problem.

To end, I would like mentioned that the problem has already been reported, but until now its has not been resolved.

In advance, thanks for your advice.

Regards.

lbreddemann
Active Contributor
0 Kudos

Very good. Given the test result w/o the setFetchSize it probably can be excluded as causing the issue.

My next step would be to run a network connection test. E.g. with iperf3 and see if the network connection between your system and the HANA server is stable and does not deliver garbled data.

Another thing: is the out of bounds index (7028547) always the same or does it change?