summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilvestre Martins2012-11-16 04:18:19 (EST)
committerEike Stepper2012-11-16 04:18:19 (EST)
commitc89a032763ffb8f544b8443e2347a29184374819 (patch)
tree879d94ef574c919bdbb398139db5a85f5db6fed8
parent84b363ec6029e3a657bd961197d538338da56d27 (diff)
downloadcdo-c89a032763ffb8f544b8443e2347a29184374819.zip
cdo-c89a032763ffb8f544b8443e2347a29184374819.tar.gz
cdo-c89a032763ffb8f544b8443e2347a29184374819.tar.bz2
[394047] [DB] During CDO Schema Migration a SQL exception occurs when
using Oracle DB - ORA-00942: table or view does not exist https://bugs.eclipse.org/bugs/show_bug.cgi?id=394047
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
index 26f4517..af703cc 100644
--- a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
+++ b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
@@ -183,4 +183,25 @@ public class OracleAdapter extends DBAdapter
{
return 30;
}
+
+ @Override
+ public boolean isTableNotFoundException(SQLException ex)
+ {
+ String message = ex.getMessage();
+ return message != null && message.toLowerCase().contains("ora-00942") && "42000".equals(ex.getSQLState());
+ }
+
+ @Override
+ public boolean isColumnNotFoundException(SQLException ex)
+ {
+ String message = ex.getMessage();
+ return message != null && message.toLowerCase().contains("ora-00904") && "42000".equals(ex.getSQLState());
+ }
+
+ @Override
+ public boolean isDuplicateKeyException(SQLException ex)
+ {
+ String message = ex.getMessage();
+ return message != null && message.toLowerCase().contains("ora-00001") && "23000".equals(ex.getSQLState());
+ }
}