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

JDBC sink insert fails with Oracle target database due to semicolon

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.4.0.Beta2
    • 2.4.0.Beta1
    • jdbc-connector
    • None

      In DBZ-6801, a change introduced a trailing ; (semicolon) in the generated SQL statements and this causes the following failure:

      Caused by: jakarta.persistence.PersistenceException: Converting `org.hibernate.exception.SQLGrammarException` to JPA `PersistenceException` : JDBC exception executing SQL [INSERT INTO DEBEZIUM.ORACLE_DEBEZIUM_UOBOWNG7HKHF (DATA) VALUES (?);]
      		at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:165)
      		at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:175)
      		at org.hibernate.query.spi.AbstractQuery.executeUpdate(AbstractQuery.java:654)
      		at io.debezium.connector.jdbc.JdbcChangeEventSink.writeInsert(JdbcChangeEventSink.java:246)
      		at io.debezium.connector.jdbc.JdbcChangeEventSink.write(JdbcChangeEventSink.java:220)
      		at io.debezium.connector.jdbc.JdbcChangeEventSink.execute(JdbcChangeEventSink.java:79)
      		... 105 common frames omitted
      	Caused by: org.hibernate.exception.SQLGrammarException: JDBC exception executing SQL [INSERT INTO DEBEZIUM.ORACLE_DEBEZIUM_UOBOWNG7HKHF (DATA) VALUES (?);]
      		at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:64)
      		at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:56)
      		at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
      		at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95)
      		at org.hibernate.sql.exec.internal.StandardJdbcMutationExecutor.execute(StandardJdbcMutationExecutor.java:97)
      		at org.hibernate.query.sql.internal.NativeNonSelectQueryPlanImpl.executeUpdate(NativeNonSelectQueryPlanImpl.java:78)
      		at org.hibernate.query.sql.internal.NativeQueryImpl.doExecuteUpdate(NativeQueryImpl.java:820)
      		at org.hibernate.query.spi.AbstractQuery.executeUpdate(AbstractQuery.java:643)
      		... 108 common frames omitted
      	Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
      

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: