瀏覽代碼

fix oracle view error

AE86 3 年之前
父節點
當前提交
0adfa1f160

+ 6 - 1
dbsyncer-listener/src/main/java/org/dbsyncer/listener/oracle/dcn/DBChangeNotification.java

@@ -96,7 +96,12 @@ public class DBChangeNotification {
 
             // 配置监听表
             for (Map.Entry<Integer, String> m : tables.entrySet()) {
-                statement.executeQuery(String.format(QUERY_TABLE_SQL, m.getValue()));
+                String sql = String.format(QUERY_TABLE_SQL, m.getValue());
+                try {
+                    statement.executeQuery(sql);
+                } catch (SQLException e) {
+                    logger.warn("配置监听表异常:{}, {}", sql, e.getMessage());
+                }
             }
         } catch (SQLException ex) {
             // if an exception occurs, we need to close the registration in order