我面临一个 JDBC 异常(100 次一次)。但即使在那种情况下,我也想控制那个异常并使过程顺利
Caused by: java.lang.NoClassDefFoundError
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:67)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3559)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3445)
at oracle.jdbc.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java:2766)
at com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:70)
at com.mchange.v2.c3p0.impl.DefaultConnectionTester.statusOnException(DefaultConnectionTester.java:59)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.handleMaybeFatalToPooledConnection(C3P0PooledConnection.java:837)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.invoke(C3P0PooledConnection.java:732)
at com.mchange.v2.c3p0.impl.$Proxy55.prepareStatement(Unknown Source)
at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:232)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:581)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:843)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:288)