Adapter for JDBC 10.3 | webMethods Adapter for JDBC Documentation | webMethods Adapter for JDBC Installation and User’s Documentation | Logging and Exception Handling | Adapter for JDBC Exception Handling
 
Adapter for JDBC Exception Handling
Adapter for JDBC throws an AdapterException for two reasons:
1. To report an error related to the adapter's logic, such as a configuration error or a connection creation error.
2. To wrap an SQLException if the adapter does not consider the SQLException's SQLCODE to be a fatal error. In this case, WmART wraps the AdapterException in a com.wm.pkg.art.error.DetailedServiceException and throws it to . AdapterExceptions containing an error code of 316 are SQLExceptions.
To manage the AdapterException, you caIntegration Servern catch the DetailedServiceException in a flow or Java service and then navigate through the nested exceptions to the AdapterException, which will contain the error code identifying the error.
AdapterException
Adapter for JDBC throws an AdapterException for two reasons:
1. To report an error related to the adapter's logic, such as a configuration error or a connection creation error.
2. To wrap an SQLException if the adapter does not consider the SQLException's SQLCODE to be a fatal error. In this case, WmART wraps the AdapterException in a com.wm.pkg.art.error.DetailedServiceException and throws it to Integration Server. AdapterExceptions containing an error code of 316 are SQLExceptions.
To manage the AdapterException, you can catch the DetailedServiceException in a flow or Java service and then navigate through the nested exceptions to the AdapterException, which will contain the error code identifying the error.
AdapterConnectionException
Adapter for JDBC throws an AdapterConnectionException to wrap an SQLException if the adapter interprets the SQLCODE as a fatal error.
In this case, WmART resets the entire connection pool. WmART then wraps the exception in com.wm.pkg.art.error.DetailedSystemException and throws it to Integration Server.
SQLException
When an adapter connection's associated JDBC driver fails to execute a SQL command against a database, the driver throws a SQLException. SQLExceptions include a SQL STATE, a SQLCODE, and an error message.
Adapter for JDBC catches the SQLException from the JDBC driver and, depending on the SQLCODE, wraps the SQLException in either an AdapterException or an AdapterConnectionException. If a SQL CODE is in the adapter's list of fatal errors for the database, the adapter wraps the exception in an AdapterConnectionException; otherwise, it wraps it in an AdapterException. Each AdapterException and AdapterConnectionException contains an adapter error code. If the error code is 316, then the exception wraps an SQLException.