We use the following code in our app to test if a database/catalog exists
try {
connection.setCatalog(name);
}catch(SQLException ex){
// Analyze SQL code here to detect "unknown catalog" error
}
For some other reasons (stale connections) we've enabled setTransactionRecoveryEnabled(true) mode and that now breaks our catalog testing try/catch. For some reason BoneCP's setCatalog() throws UndeclaredThrowableException instead of SQLException
java.lang.reflect.UndeclaredThrowableException: null
at com.sun.proxy.$Proxy0.setCatalog(Unknown Source) ~[na:na]
at com.jolbox.bonecp.ConnectionHandle.setCatalog(ConnectionHandle.java:1305) ~[bonecp-0.8.0.RELEASE.jar:na]
at com.yoxel.db.server.ClientModel.getNewPoolConnection(ClientModel.java:117) ~[server-1.1-SNAPSHOT.jar:na]
Hello,
We use the following code in our app to test if a database/catalog exists
try { setCatalog( name); SQLException ex){
connection.
}catch(
// Analyze SQL code here to detect "unknown catalog" error
}
For some other reasons (stale connections) we've enabled setTransactionR ecoveryEnabled( true) mode and that now breaks our catalog testing try/catch. For some reason BoneCP's setCatalog() throws UndeclaredThrow ableException instead of SQLException
java.lang. reflect. UndeclaredThrow ableException: null proxy.$ Proxy0. setCatalog( Unknown Source) ~[na:na] bonecp. ConnectionHandl e.setCatalog( ConnectionHandl e.java: 1305) ~[bonecp- 0.8.0.RELEASE. jar:na] db.server. ClientModel. getNewPoolConne ction(ClientMod el.java: 117) ~[server- 1.1-SNAPSHOT. jar:na]
at com.sun.
at com.jolbox.
at com.yoxel.
Any ideas?