on 06-16-2017 3:53 PM - last edited on 02-03-2024 9:10 PM by postmig_api_4
Hi,
I am using plain JDBC to insert records in the table. I see this issue during the row insertion very frequently..(not consistently though)
Below is the stack trace:
Caused by: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [7]: feature not supported: invalid CESU-8 encoding for Unicode string at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:357) at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:197) at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:110) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:934) at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:717) at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:523) at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:361) at com.sap.db.jdbc.CallableStatementSapDB.executeUpdate(CallableStatementSapDB.java:903) at com.sap.db.jdbc.trace.PreparedStatement.executeUpdate(PreparedStatement.java:240)
Can someone please tell me what this error means ? And how to resolve. ?
Thank you very much in advance'
Digneshn
Thank you very much for your reply.
I am using String.getBytes() in code. Possibly i try to pass "UTF-8" as charset to getBytes method to see if it resolves the issue.
Thank you once again. 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much for your reply.
I am using string,getBytes() in my code.. Possibly I will try passing "UTF-8" charset to the getBytes method to see if it resolves the issue.
Thank you once again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As common with questions why a certain piece of code doesn't work as expected, it's hard to tell, what's wrong without actually seeing your code.
From the error message, my best guess is that you try and feed a byte-stream of sorts into an NVARCHAR field. SAP HANA supports UTF-8/CESU-8 encoding which means that only certain combinations of bytes are actually valid. Therefore, the next step in analysing this issue should probably be to review the bytes that you try to store in SAP HANA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.