RSS feed
All(28) Eclipse(4) Java(5) JDBC(5) JSP(3) Maven(7) Personal (1) Spring(3) Tomcat(5)
<< Common Maven Commands | Home | Displaying repetitive type information with displaytag and struts >>

Helpful Debugging MYSQL JDBC URL Parameters

I recently changed the JDBC urls I have used in my spring configuration for DBCP to add a couple of error debugging properties.


dumpMetadataOnColumnNotFound = Should the driver dump the field-level metadata of a result set into the exception message when ResultSet.findColumn() fails?

dumpQueriesOnException = Should the driver dump the contents of the query sent to the server in the message for SQLExceptions. This is really helpful to point out what the query is on SQLException. I have found this extremely useful.

<property name="url" value="jdbc:mysql://mysvr:3306/mydb?zeroDateTimeBehavior=convertToNull
&amp;dumpMetaDataOnColumnNotFound=true&amp;dumpQueriesOnException=true"
/>

The full list of query parameters can be seen at http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html

 

 




Add a comment Send a TrackBack