When I call an SQL statement through JDBC in DB2 and the statement fails, I encounter a SQLException with the following message text:
com.ibm.db2.jcc.a.nn: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=O.METADATENSATZ, DRIVER=3.52.95
I tried to automatically translate the message according to the list of errors published by IBM , but in messages that link to other elements of the exception.
When searching for these elements inside an exception, I found DB2ExceptionFormatter and tried to use it to access the missing elements.
But I stopped here because the DB2ExceptionFormatter gave me a hint:
An error occurred while trying to get the message text from the server. Only message tokens are available.
So my question is:. What do I need to configure to receive the correct messages from the DB2 server?
If I can receive a humanoid message from the server, I could use it directly and would not have to translate it myself.
java db2 jdbc
tangens
source share