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

Oracle connector - Cannot parse column default value 'NULL ' to type '2'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.8.0.Beta1
    • 1.8.0.Alpha2
    • oracle-connector
    • None
    • False
    • False
    • Hide

      not sure what this means:

      [2021-11-24 21:50:40,231] WARN Cannot parse column default value 'NULL ' to type '2'.  Expression evaluation is not supported. (io.debezium.co
      nnector.oracle.OracleDefaultValueConverter:76)
      [2021-11-24 21:50:40,232] WARN Cannot parse column default value 'NULL ' to type '2'.  Expression evaluation is not supported. (io.debezium.co
      nnector.oracle.OracleDefaultValueConverter:76)
       
      Show
      not sure what this means: [2021-11-24 21:50:40,231] WARN Cannot parse column default value 'NULL ' to type '2' .  Expression evaluation is not supported. (io.debezium.co nnector.oracle.OracleDefaultValueConverter:76) [2021-11-24 21:50:40,232] WARN Cannot parse column default value 'NULL ' to type '2' .  Expression evaluation is not supported. (io.debezium.co nnector.oracle.OracleDefaultValueConverter:76)

      2 diff stack traces:

      [2021-11-25 07:51:39,083] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (0,Optional.empty) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,084] WARN Cannot parse column default value 'NULL ' to type '2'.  Expression evaluation is not supported. (io.debezium.connector.oracle.OracleDefaultValueConverter:76)
      [2021-11-25 07:51:39,084] DEBUG Parsing failed due to error (io.debezium.connector.oracle.OracleDefaultValueConverter:77)
      java.lang.NumberFormatException
          at java.math.BigDecimal.<init>(BigDecimal.java:497)
          at java.math.BigDecimal.<init>(BigDecimal.java:383)
          at java.math.BigDecimal.<init>(BigDecimal.java:809)
          at io.debezium.jdbc.JdbcValueConverters.lambda$toBigDecimal$45(JdbcValueConverters.java:1057)
          at io.debezium.jdbc.JdbcValueConverters.convertValue(JdbcValueConverters.java:1297)
          at io.debezium.jdbc.JdbcValueConverters.toBigDecimal(JdbcValueConverters.java:1034)
          at io.debezium.connector.oracle.OracleValueConverters.convertDecimal(OracleValueConverters.java:418)
          at io.debezium.connector.oracle.OracleValueConverters.convertNumeric(OracleValueConverters.java:432)
          at io.debezium.connector.oracle.OracleValueConverters.convertVariableScale(OracleValueConverters.java:535)
          at io.debezium.connector.oracle.OracleValueConverters.lambda$getNumericConverter$13(OracleValueConverters.java:254)
          at io.debezium.connector.oracle.OracleDefaultValueConverter.convertDefaultValue(OracleDefaultValueConverter.java:94)
          at io.debezium.connector.oracle.OracleDefaultValueConverter.parseDefaultValue(OracleDefaultValueConverter.java:67)
          at io.debezium.relational.TableSchemaBuilder.lambda$addField$9(TableSchemaBuilder.java:391)
          at java.util.Optional.flatMap(Optional.java:241)
          at io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:391)
          at io.debezium.relational.TableSchemaBuilder.lambda$create$0(TableSchemaBuilder.java:138)
          at java.util.ArrayList.forEach(ArrayList.java:1259)
          at io.debezium.relational.TableSchemaBuilder.create(TableSchemaBuilder.java:137)
          at io.debezium.relational.RelationalDatabaseSchema.buildAndRegisterSchema(RelationalDatabaseSchema.java:135)
          at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:65)
          at io.debezium.connector.oracle.OracleConnectorTask.validateAndLoadDatabaseHistory(OracleConnectorTask.java:182)
          at io.debezium.connector.oracle.OracleConnectorTask.start(OracleConnectorTask.java:71)
          at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:133)
          at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:231)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      [2021-11-25 07:51:39,085] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (0,Optional.empty) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,085] DEBUG - field 'ORG_ID' (STRING) from column ORG_ID NUMBER(0) DEFAULT VALUE NULL  (io.debezium.relational.TableSchemaBuilder:415) 

      and

       

      [2021-11-25 07:51:39,435] DEBUG Building schema for column DEMAND_CLASS_CODE of type 12 named VARCHAR2 with constraints (30,Optional.empty) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,435] DEBUG JdbcValueConverters returned 'org.apache.kafka.connect.data.SchemaBuilder' for column 'DEMAND_CLASS_CODE' (io.debezium.connector.oracle.OracleValueConverters:152)
      [2021-11-25 07:51:39,435] DEBUG - field 'DEMAND_CLASS_CODE' (STRING) from column DEMAND_CLASS_CODE VARCHAR2(30) DEFAULT VALUE NULL (io.debezium.relational.TableSchemaBuilder:415)
      [2021-11-25 07:51:39,436] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (15,Optional[0]) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,436] WARN Cannot parse column default value 'NULL ' to type '2'.  Expression evaluation is not supported. (io.debezium.connector.oracle.OracleDefaultValueConverter:76)
      [2021-11-25 07:51:39,436] DEBUG Parsing failed due to error (io.debezium.connector.oracle.OracleDefaultValueConverter:77)
      java.lang.NumberFormatException: For input string: "NULL "
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Long.parseLong(Long.java:589)
              at java.lang.Long.valueOf(Long.java:803)
              at io.debezium.jdbc.JdbcValueConverters.lambda$convertBigInt$42(JdbcValueConverters.java:928)
              at io.debezium.jdbc.JdbcValueConverters.convertValue(JdbcValueConverters.java:1297)
              at io.debezium.jdbc.JdbcValueConverters.convertBigInt(JdbcValueConverters.java:916)
              at io.debezium.connector.oracle.OracleValueConverters.convertNumericAsBigInteger(OracleValueConverters.java:484)
              at io.debezium.connector.oracle.OracleValueConverters.lambda$getNumericConverter$11(OracleValueConverters.java:246)
              at io.debezium.connector.oracle.OracleDefaultValueConverter.convertDefaultValue(OracleDefaultValueConverter.java:94)
              at io.debezium.connector.oracle.OracleDefaultValueConverter.parseDefaultValue(OracleDefaultValueConverter.java:67)
              at io.debezium.relational.TableSchemaBuilder.lambda$addField$9(TableSchemaBuilder.java:391)
              at java.util.Optional.flatMap(Optional.java:241)
              at io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:391)
              at io.debezium.relational.TableSchemaBuilder.lambda$create$2(TableSchemaBuilder.java:147)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
              at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
              at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
              at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
              at io.debezium.relational.TableSchemaBuilder.create(TableSchemaBuilder.java:145)
              at io.debezium.relational.RelationalDatabaseSchema.buildAndRegisterSchema(RelationalDatabaseSchema.java:135)
              at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:65)
              at io.debezium.connector.oracle.OracleConnectorTask.validateAndLoadDatabaseHistory(OracleConnectorTask.java:182)
              at io.debezium.connector.oracle.OracleConnectorTask.start(OracleConnectorTask.java:71)
              at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:133)
              at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:231)
              at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
              at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      [2021-11-25 07:51:39,436] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (15,Optional[0]) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,436] DEBUG - field 'ORG_ID' (INT64) from column ORG_ID NUMBER(15, 0) DEFAULT VALUE NULL  (io.debezium.relational.TableSchemaBuilder:415) 

       

       

      [2021-11-25 07:51:39,404] DEBUG Building schema for column STATUS of type 12 named VARCHAR2 with constraints (1,Optional.empty) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,404] DEBUG JdbcValueConverters returned 'org.apache.kafka.connect.data.SchemaBuilder' for column 'STATUS' (io.debezium.connector.oracle.OracleValueConverters:152)
      [2021-11-25 07:51:39,404] DEBUG - field 'STATUS' (STRING) from column STATUS VARCHAR2(1) NOT NULL (io.debezium.relational.TableSchemaBuilder:415)
      [2021-11-25 07:51:39,404] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (15,Optional[0]) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,405] WARN Cannot parse column default value 'NULL ' to type '2'.  Expression evaluation is not supported. (io.debezium.connector.oracle.OracleDefaultValueConverter:76)
      [2021-11-25 07:51:39,405] DEBUG Parsing failed due to error (io.debezium.connector.oracle.OracleDefaultValueConverter:77)
      java.lang.NumberFormatException: For input string: "NULL "
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Long.parseLong(Long.java:589)
          at java.lang.Long.valueOf(Long.java:803)
          at io.debezium.jdbc.JdbcValueConverters.lambda$convertBigInt$42(JdbcValueConverters.java:928)
          at io.debezium.jdbc.JdbcValueConverters.convertValue(JdbcValueConverters.java:1297)
          at io.debezium.jdbc.JdbcValueConverters.convertBigInt(JdbcValueConverters.java:916)
          at io.debezium.connector.oracle.OracleValueConverters.convertNumericAsBigInteger(OracleValueConverters.java:484)
          at io.debezium.connector.oracle.OracleValueConverters.lambda$getNumericConverter$11(OracleValueConverters.java:246)
          at io.debezium.connector.oracle.OracleDefaultValueConverter.convertDefaultValue(OracleDefaultValueConverter.java:94)
          at io.debezium.connector.oracle.OracleDefaultValueConverter.parseDefaultValue(OracleDefaultValueConverter.java:67)
          at io.debezium.relational.TableSchemaBuilder.lambda$addField$9(TableSchemaBuilder.java:391)
          at java.util.Optional.flatMap(Optional.java:241)
          at io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:391)
          at io.debezium.relational.TableSchemaBuilder.lambda$create$0(TableSchemaBuilder.java:138)
          at java.util.ArrayList.forEach(ArrayList.java:1259)
          at io.debezium.relational.TableSchemaBuilder.create(TableSchemaBuilder.java:137)
          at io.debezium.relational.RelationalDatabaseSchema.buildAndRegisterSchema(RelationalDatabaseSchema.java:135)
          at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:65)
          at io.debezium.connector.oracle.OracleConnectorTask.validateAndLoadDatabaseHistory(OracleConnectorTask.java:182)
          at io.debezium.connector.oracle.OracleConnectorTask.start(OracleConnectorTask.java:71)
          at io.debezium.connector.common.BaseSourceTask.start(BaseSourceTask.java:133)
          at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:231)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:237)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      [2021-11-25 07:51:39,405] DEBUG Building schema for column ORG_ID of type 2 named NUMBER with constraints (15,Optional[0]) (io.debezium.connector.oracle.OracleValueConverters:125)
      [2021-11-25 07:51:39,405] DEBUG - field 'ORG_ID' (INT64) from column ORG_ID NUMBER(15, 0) DEFAULT VALUE NULL  (io.debezium.relational.TableSchemaBuilder:415) 

      some of my table ddl:

      GLOBAL_ATTRIBUTE20                 VARCHAR2(150) 
      ORIG_SYSTEM_REFERENCE     NOT NULL VARCHAR2(240) 
      STATUS                    NOT NULL VARCHAR2(1)   
      ORG_ID                             NUMBER(15)  

       

      actually this is more likely the cause?:

              ccranfor@redhat.com Chris Cranford
              tooptoop toop toop (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: