Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete traces: Exception text missing #105

Closed
markheger opened this issue Mar 16, 2020 · 4 comments
Closed

Incomplete traces: Exception text missing #105

markheger opened this issue Mar 16, 2020 · 4 comments
Assignees

Comments

@markheger
Copy link
Member

In the logs coming from JDBCRun when there is a data type mismatch:
CDIST2821W A SQL exception occurred. The exception is {0} .
Looks like the exception string is not being inserted into the message.

@lpkamesam
Copy link

I have also noticed the issues where I don't receive {sqlCode=0,sqlState="",sqlMessage=""

@anouri
Copy link
Member

anouri commented Mar 23, 2020

If your database is a Db2, you have to set the parameter etrieveMessagesFromServerOnGetMessage=true; in jdbcUrl to get sqlMessage.

jdbcUrl : "jdbc:db2://tank143.fyre.ibm.com:50000/TESTDB2:retrieveMessagesFromServerOnGetMessage=true;" ;

More details in
https://github.com/IBMStreams/streamsx.jdbc/wiki/How-to-connect-to-a-DB2-database-via-JDBC-toolkit

@anouri
Copy link
Member

anouri commented Mar 23, 2020

The JDBCRun operator checks now:
if the database is a Db2 it adds the property "retrieveMessagesFromServerOnGetMessage=true;" to URL to retrieve full SQL error message

if ( (jdbcUrl.contains("db2")) && (!jdbcUrl.contains("retrieveMessagesFromServerOnGetMessage") ))
{
	jdbcUrl = jdbcUrl + ":retrieveMessagesFromServerOnGetMessage=true;" ;
}

More details in:
https://www.ibm.com/support/knowledgecenter/fi/SSEPGG_9.7.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_tjvjcerr.html

anouri added a commit that referenced this issue Mar 24, 2020
anouri added a commit that referenced this issue Mar 24, 2020
anouri added a commit that referenced this issue Mar 24, 2020
* add etrieveMessagesFromServerOnGetMessage=true to URL #105

* add etrieveMessagesFromServerOnGetMessage=true to URL #105

* check if the database is a Db2 #105

* streamsx.jdbc version upgraded to 1.8.0 #150

* Add TRACE for SQL error message #105
@anouri
Copy link
Member

anouri commented Apr 30, 2020

@anouri anouri closed this as completed Apr 30, 2020
anouri added a commit that referenced this issue Jul 13, 2020
* streamsx.jdbc merge develop to master branche  (#107)

* add etrieveMessagesFromServerOnGetMessage=true to URL #105

* add etrieveMessagesFromServerOnGetMessage=true to URL #105

* check if the database is a Db2 #105

* streamsx.jdbc version upgraded to 1.8.0 #150

* Add TRACE for SQL error message #105

* Create CHANGELOG.md

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants