Use SQLException.getSQLState(), getErrorCode() and getMessage() to diagnose JDBC failures. With Prism 2.4 structured error details, the driver exposes the server’s SQLSTATE and vendor error code and preserves the server message. An absent or invalid SQLSTATE is reported as UNSPECIFIED. An absent vendor code is reported as -1. An explicitly supplied code of 0 is preserved.
Server errors are represented by PrismInterfaceServiceException, a subclass of SQLException. For a failed batch, the BatchUpdateException carries the server diagnostic as its cause. A server-confirmed batch query timeout raises SQLTimeoutException with the batch exception as its cause. See batch failures and query and network timeouts.
Check the exception type for unsupported methods, which often throw SQLFeatureNotSupportedException.
The table lists Polypheny-specific codes. States beginning with I identify internal errors. Codes in the 9000 range are generated by the Prism query interface. The same code or state can be used by more than one operation, so include the message when reporting an error.
| Type | Error State | Error Code | Description |
|---|---|---|---|
| SQL | 42S22 | 4 | Column Does Not Exist |
| SQL | 22003 | 5 | Illegal Column Access |
| SQL | 42000 | 6 | Illegal Operation |
| SQL | 2F002 | 7 | Modification Not Permitted |
| SQL | 22003 | 8 | Illegal Value |
| SQL | 08003 | 11 | Connection Lost |
| SQL | 42000 | 13 | Parameter Does Not Exist |
| SQL | 0A000 | 14 | Option Not Supported |
| SQL | 42S22 | 17 | Data Type Mismatch |
| Internal | UNSPECIFIED | -1 | Unspecified |
| Internal | I1001 | 1 | Driver Threading Error |
| Internal | I2001 | 2 | Invalid URL Parsing |
| Internal | I3001 | 3 | Invalid Result Type |
| Internal | I4001 | 9 | Stream Error |
| Internal | I5001 | 10 | Incorrect Wrapper Type |
| Internal | I4002 | 12 | UDT Reached End |
| Internal | I4003 | 18 | Missing Interface |
| Internal | I4003 | 19 | UDT Construction Failed |
| Internal | I5001 | 20 | Entry Does Not Exist |
| Internal | I9001 | 9001 | Interface statement is not linked to a Polypheny statement. |
| Internal | I9000 | 9000 | Wrong Result Type |
| Internal | I9002 | 9002 | Statement Not Prepared |
| Internal | I9003 | 9003 | Wrong Preparer for Statement Language |
| Internal | I9004 | 9004 | No Executor Available for Result Type |
| Internal | I9005 | 9005 | No Executor Available for Language |
| Internal | I9006 | 9006 | User Already Exists / Does Not Exist |
| Internal | I9007 | 9007 | Unknown Namespace / Database Version Info Retrieval Failed |
| Internal | I9008 | 9008 | Committing Transaction Failed / Rollback of Transaction Failed |
| Internal | I9009 | 9009 | No Statement with This ID / No Prepared Statement with This ID |