我正面臨一個JDBC異常(100次)。 但是,即使在這種情況下,我想採取這種異常的控制,使流程順暢處理JDBC異常
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)
NoClassDefFoundError不是JDBC異常。實際上它根本不是例外。這是一個錯誤。我向你添加了相關標籤,並建議你閱讀相關問題。 – Tarlog