-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
0.9.0.Beta1
-
None
We are currently running with 0.4 debezium with confluent 3.2.1 in production and have started the initiative to migrate to confluent 5.0.1 and debezium 0.9.0.beta1 (will eventually migrate to next stable version).
I am getting antlr parsing error for one of the table which was working fine with earlier version.
Looks like Archive is considered as token in antlr
[2018-12-12 16:15:54,308] ERROR Execption while rollback is executed (io.debezium.connector.mysql.SnapshotReader)
java.sql.SQLNonTransientConnectionException: Can''t call rollback when autocommit=true
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:1844)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:733)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
manjeet got exception no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sales_order_id` int(10) unsigne
int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datetime NOT NULL,\n `end_date`
d` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
io.debezium.text.ParsingException: no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sales_order_id` in
rder_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datetime NOT NULL,\n
,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40)
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.reportNoViableAlternative(DefaultErrorStrategy.java:282)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:121)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1071)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:805)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:71)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:44)
at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80)
at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:301)
at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:442)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:436)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:377)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:440)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.antlr.v4.runtime.NoViableAltException
at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2023)
at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:879)
... 12 more
[2018-12-12 16:15:54,323] ERROR Failed due to error: Aborting snapshot due to error when last running 'UNLOCK TABLES': no viable alternative at input 'CREATE TABLE `ticke
signed NOT NULL AUTO_INCREMENT,\n `sales_order_id` int(10) unsigned NOT NULL,\n `order_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsi
ar(255) NOT NULL,\n `start_date` datetime NOT NULL,\n `end_date` datetime NOT NULL,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive'' (i
pshotReader)
org.apache.kafka.connect.errors.ConnectException: no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sal
NOT NULL,\n `order_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datet
tetime NOT NULL,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:202)
at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:178)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:739)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: io.debezium.text.ParsingException: no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sales_o
NULL,\n `order_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datetime
me NOT NULL,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40)
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.reportNoViableAlternative(DefaultErrorStrategy.java:282)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:121)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1071)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:805)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:71)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:44)
at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80)
at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:301)
at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:442)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:436)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:377)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:440)
... 3 more
Caused by: org.antlr.v4.runtime.NoViableAltException
at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2023)
at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:879)
... 12 more
[2018-12-12 16:15:54,773] ERROR WorkerSourceTask
rTask)
org.apache.kafka.connect.errors.ConnectException: no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sal
NOT NULL,\n `order_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datet
tetime NOT NULL,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
at io.debezium.connector.mysql.AbstractReader.wrap(AbstractReader.java:202)
at io.debezium.connector.mysql.AbstractReader.failed(AbstractReader.java:178)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:739)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: io.debezium.text.ParsingException: no viable alternative at input 'CREATE TABLE `ticket` (\n `ticket_id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `sales_o
NULL,\n `order_version` int(10) NOT NULL DEFAULT '1',\n `production_system_id` smallint(5) unsigned NOT NULL,\n `name` varchar(255) NOT NULL,\n `start_date` datetime
me NOT NULL,\n `owner_id` int(10) unsigned DEFAULT NULL,\n `status` enum('Active','Archive''
at io.debezium.antlr.ParsingErrorListener.syntaxError(ParsingErrorListener.java:40)
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.reportNoViableAlternative(DefaultErrorStrategy.java:282)
at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:121)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:1071)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.root(MySqlParser.java:805)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:71)
at io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser.parseTree(MySqlAntlrDdlParser.java:44)
at io.debezium.antlr.AntlrDdlParser.parse(AntlrDdlParser.java:80)
at io.debezium.connector.mysql.MySqlSchema.applyDdl(MySqlSchema.java:301)
at io.debezium.connector.mysql.SnapshotReader.lambda$execute$12(SnapshotReader.java:442)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:436)
at io.debezium.jdbc.JdbcConnection.query(JdbcConnection.java:377)
at io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:440)
... 3 more
Caused by: org.antlr.v4.runtime.NoViableAltException
at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2023)
at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:467)
at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:393)
at io.debezium.ddl.parser.mysql.generated.MySqlParser.sqlStatements(MySqlParser.java:879)
... 12 more
[2018-12-12 16:15:54,776] ERROR WorkerSourceTask{id=debezium-o1prod_history-spotlight-ticket-2018121280788-0}
Task is being killed and will not recover until manually res
ct.runtime.WorkerTask)
- is related to
-
DBZ-1028 MySQL Antlr runtime.NoViableAltException
- Closed