Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-3606

Oracle Connector - got InputMismatchException mismatched input 'CASCADE' expecting {'AS', 'PURGE', ';'}

    XMLWordPrintable

Details

    • False
    • False
    • Undefined
    • Hide
       #curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" 192.168.0.102:8083/connectors/ -d ' #curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" 192.168.0.102:8083/connectors/ -d ' {   "name": "emp-connector",   "config": { "connector.class" : "io.debezium.connector.oracle.OracleConnector", "tasks.max" : "1", "database.hostname" : "oracle-xe-11g-r2", "database.port" : "1521", "database.user" : "dbzuser", "database.password" : "dbz", "database.dbname" : "XE", "database.server.name" : "dbserver01", "table.whitelist" : "test.employee", "table.include.list" : "test.employee", "database.history.kafka.bootstrap.servers" : "kafka:9092", "database.history.kafka.topic": "schema-changes.emp", "errors.log.enable": "true", "snapshot.mode": "initial", "log.mining.strategy": "online_catalog", "event.processing.failure.handling.mode": "warn"   } }'
      
      Show
      #curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" 192.168.0.102:8083/connectors/ -d ' #curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" 192.168.0.102:8083/connectors/ -d ' {   "name" : "emp-connector" ,   "config" : { "connector.class" : "io.debezium.connector.oracle.OracleConnector" , "tasks.max" : "1" , "database.hostname" : "oracle-xe-11g-r2" , "database.port" : "1521" , "database.user" : "dbzuser" , "database.password" : "dbz" , "database.dbname" : "XE" , "database.server.name" : "dbserver01" , "table.whitelist" : "test.employee" , "table.include.list" : "test.employee" , "database.history.kafka.bootstrap.servers" : "kafka:9092" , "database.history.kafka.topic" : "schema-changes.emp" , "errors.log.enable" : " true " , "snapshot.mode" : "initial" , "log.mining.strategy" : "online_catalog" , "event.processing.failure.handling.mode" : "warn"   } }'

    Description

      Get following error when connect to Oracle 11G X2,

      When I deleting table with statement :

      DROP TABLE TEST.STUDENT CASCADE CONSTRAINTS;
      

      Logs :

      2021-06-09 08:04:44,804 ERROR  ||  WorkerSourceTask{id=oracle-connector-new-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not re               cover until manually restarted   [org.apache.kafka.connect.runtime.WorkerTask]
      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
              at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:42)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:203)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:159)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:122)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'DROP TABLE TEST.STUDENT CASCADE CONSTRAINT               S AS "BIN$xFG5hGLsdS/gUFgKAwgYHw==$0" ;'
      mismatched input 'CASCADE' expecting {'AS', 'PURGE', ';'}
              at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:43)
              at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
              at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
              at org.antlr.v4.runtime.DefaultErrorStrategy.reportInputMismatch(DefaultErrorStrategy.java:327)
              at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:139)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.drop_table(PlSqlParser.java:58642)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.unit_statement(PlSqlParser.java:2563)
              at io.debezium.connector.oracle.antlr.OracleDdlParser.parseTree(OracleDdlParser.java:68)
              at io.debezium.connector.oracle.antlr.OracleDdlParser.parseTree(OracleDdlParser.java:32)
              at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:82)
              at io.debezium.connector.oracle.antlr.OracleDdlParser.parse(OracleDdlParser.java:63)
              at io.debezium.connector.oracle.OracleSchemaChangeEventEmitter.emitSchemaChangeEvent(OracleSchemaChangeEventEmitter.java:81)
              at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:297)
              at io.debezium.connector.oracle.logminer.LogMinerQueryResultProcessor.processResult(LogMinerQueryResultProcessor.java:166)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:188)
              ... 7 more
      Caused by: org.antlr.v4.runtime.InputMismatchException
              at org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:270)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.drop_table(PlSqlParser.java:58615)
              ... 16 more
      
      

      And I got same error exception also : InputMismatchException
      When create table using statement using with syntax "STORAGE"

      CREATE TABLE TEST.STUDENT
      (
        STUDENT_ID  VARCHAR2(20 BYTE),
        NAME        VARCHAR2(200 BYTE)
      )
      TABLESPACE TEST_TBS
      PCTUSED    0
      PCTFREE    10
      INITRANS   1
      MAXTRANS   255
      STORAGE    (
                  INITIAL          64K
                  NEXT             1M
                  MINEXTENTS       1
                  MAXEXTENTS       UNLIMITED
                  PCTINCREASE      0
                  BUFFER_POOL      DEFAULT
                 )
      LOGGING 
      NOCOMPRESS 
      NOCACHE
      MONITORING;
      

      Is it my miss config ?

      Attachments

        Activity

          People

            ccranfor@redhat.com Chris Cranford
            internalsupportwo Internal Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: