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

Oracle connector Parsing Exception: DDL statement couldn't be parsed

XMLWordPrintable

    • False
    • False
    • Hide

      1. Create c##dbzuser in ORCLCDB (cdb) as explained inside the documentation

      2. create two tables with user c##dbzuser inside ORCLPDB1 (pdb):

      create table inbox (id raw(255) not null, timestamp timestamp, primary key (id))
      create table outbox (id raw(255) not null, aggregate_id varchar2(255 char) not null, aggregate_type varchar2(255 char) not null, payload VARCHAR2(4000 CHAR), timestamp timestamp, type varchar2(255 char) not null, primary key (id))
      

      3. Enable SUPPLEMENTAL LOG for outbox table
      4. Run connector with below config:

        config:
          database.hostname: 192.168.99.108
          database.port: 1521
          database.user: C##DBZUSER
          database.password: dbz
          database.dbname: ORCLCDB
          database.pdb.name: ORCLPDB1
          database.server.name: server10
          database.connection.adapter: logminer
          schema.include.list: C##DBZUSER
          table.include.list: C##DBZUSER.OUTBOX
          tombstones.on.delete: false
          database.history.kafka.bootstrap.servers: my-cluster-kafka-bootstrap:9092
          database.history.kafka.topic: schema-changes.outbox
          poll.interval.ms: 100
      
      

      5. After the connector is up and running, drop the inbox table (with user c##dbzuser inside ORCLPDB1):

      drop table inbox cascade constraints;
      

      Note: I have not enabled SUPPLEMENTAL LOG for INBOX table and even the INBOX table is not included inside table.include.list.
      6. An exception will be thrown from the connector:

      2021-09-02 08:10:04,546 ERROR Mining session stopped due to the {} (io.debezium.connector.oracle.logminer.LogMinerHelper) [debezium-oracleconnector-server10-change-event-source-coordinator]
      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'drop table inbox cascade constraints AS "BIN$yv+1ra/roTjgUwEBAH+ByQ==$0" ;'
      mismatched input 'AS' expecting {'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:59284)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.unit_statement(PlSqlParser.java:2572)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:1997)
              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:84)
              at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:305)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleSchemaChange(AbstractLogMinerEventProcessor.java:251)
              at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.handleSchemaChange(MemoryLogMinerEventProcessor.java:317)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:175)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:150)
              at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.process(MemoryLogMinerEventProcessor.java:115)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:144)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:54)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:165)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:127)
              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:829)
      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:59269)
              ... 22 more
      2021-09-02 08:10:04,546 ERROR Producer failure (io.debezium.pipeline.ErrorHandler) [debezium-oracleconnector-server10-change-event-source-coordinator]
      io.debezium.text.ParsingException: DDL statement couldn't be parsed. Please open a Jira issue with the statement 'drop table inbox cascade constraints AS "BIN$yv+1ra/roTjgUwEBAH+ByQ==$0" ;'
      mismatched input 'AS' expecting {'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:59284)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.unit_statement(PlSqlParser.java:2572)
              at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:1997)
              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:84)
              at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:305)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleSchemaChange(AbstractLogMinerEventProcessor.java:251)
              at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.handleSchemaChange(MemoryLogMinerEventProcessor.java:317)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:175)
              at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:150)
              at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.process(MemoryLogMinerEventProcessor.java:115)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:144)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:54)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:165)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:127)
              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:829)
      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:59269)
              ... 22 more
      2021-09-02 08:10:04,546 INFO startScn=5043601, endScn=5043652 (io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource) [debezium-oracleconnector-server10-change-event-source-coordinator]
      

       

      Show
      1. Create c##dbzuser  in ORCLCDB (cdb) as explained inside the documentation 2. create two tables with user  c##dbzuser  inside ORCLPDB1 (pdb): create table inbox (id raw(255) not null , timestamp timestamp, primary key (id)) create table outbox (id raw(255) not null , aggregate_id varchar2(255 char ) not null , aggregate_type varchar2(255 char ) not null , payload VARCHAR2(4000 CHAR), timestamp timestamp, type varchar2(255 char ) not null , primary key (id)) 3. Enable SUPPLEMENTAL LOG for outbox table 4. Run connector with below config: config: database.hostname: 192.168.99.108 database.port: 1521 database.user: C##DBZUSER database.password: dbz database.dbname: ORCLCDB database.pdb.name: ORCLPDB1 database.server.name: server10 database.connection.adapter: logminer schema.include.list: C##DBZUSER table.include.list: C##DBZUSER.OUTBOX tombstones.on.delete: false database.history.kafka.bootstrap.servers: my-cluster-kafka-bootstrap:9092 database.history.kafka.topic: schema-changes.outbox poll.interval.ms: 100 5. After the connector is up and running, drop the  inbox table (with user c##dbzuser inside ORCLPDB1 ): drop table inbox cascade constraints; Note:  I have not enabled SUPPLEMENTAL LOG for  INBOX  table and even the INBOX table is not included inside  table.include.list . 6. An exception will be thrown from the connector: 2021-09-02 08:10:04,546 ERROR Mining session stopped due to the {} (io.debezium.connector.oracle.logminer.LogMinerHelper) [debezium-oracleconnector-server10-change-event-source-coordinator] io.debezium.text.ParsingException: DDL statement couldn 't be parsed. Please open a Jira issue with the statement ' drop table inbox cascade constraints AS "BIN$yv+1ra/roTjgUwEBAH+ByQ==$0" ;' mismatched input 'AS' expecting { '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:59284) at io.debezium.ddl.parser.oracle.generated.PlSqlParser.unit_statement(PlSqlParser.java:2572) at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:1997) 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:84) at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:305) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleSchemaChange(AbstractLogMinerEventProcessor.java:251) at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.handleSchemaChange(MemoryLogMinerEventProcessor.java:317) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:175) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:150) at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.process(MemoryLogMinerEventProcessor.java:115) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:144) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:54) at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:165) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:127) 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:829) 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:59269) ... 22 more 2021-09-02 08:10:04,546 ERROR Producer failure (io.debezium.pipeline.ErrorHandler) [debezium-oracleconnector-server10-change-event-source-coordinator] io.debezium.text.ParsingException: DDL statement couldn 't be parsed. Please open a Jira issue with the statement ' drop table inbox cascade constraints AS "BIN$yv+1ra/roTjgUwEBAH+ByQ==$0" ;' mismatched input 'AS' expecting { '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:59284) at io.debezium.ddl.parser.oracle.generated.PlSqlParser.unit_statement(PlSqlParser.java:2572) at io.debezium.ddl.parser.oracle.generated.PlSqlParser.sql_script(PlSqlParser.java:1997) 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:84) at io.debezium.pipeline.EventDispatcher.dispatchSchemaChangeEvent(EventDispatcher.java:305) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.handleSchemaChange(AbstractLogMinerEventProcessor.java:251) at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.handleSchemaChange(MemoryLogMinerEventProcessor.java:317) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processRow(AbstractLogMinerEventProcessor.java:175) at io.debezium.connector.oracle.logminer.processor.AbstractLogMinerEventProcessor.processResults(AbstractLogMinerEventProcessor.java:150) at io.debezium.connector.oracle.logminer.processor.memory.MemoryLogMinerEventProcessor.process(MemoryLogMinerEventProcessor.java:115) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:144) at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:54) at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:165) at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:127) 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:829) 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:59269) ... 22 more 2021-09-02 08:10:04,546 INFO startScn=5043601, endScn=5043652 (io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource) [debezium-oracleconnector-server10-change-event-source-coordinator]  

      The Oracle connector throws a ParsingException when removing a table even when that table is not included inside connector's config and SUPPLEMENTAL LOG have not been enabled for it.

      I'm using 1.7.0-20210831.000246-215 build of Debezium with Oracle 19c Enterprise and ojdbc11-21.1.0.0 driver.

              ccranfor@redhat.com Chris Cranford
              p30sina Sina Nourian (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: