SQL Server "UTC" is recognized as "Z" to be compatible with the legacy style

ttcibm8c  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(45)

I transfer data from SQL Server to PostgreSQL using Embulk. Postgresql version 15.4

Below are the drivers I used and the input and output gems installed in the embulk gem list.

Java version: 1.8
SQL : sqljdbc42.jar
PostgreSQL: postgresql-42.7.0.jar

Gems list;
embulk-input-sqlserver (0.13.2 java)
embulk-output-postgresql (0.8.7)

This is the error I get while transferring, can you support me?

2023-12-04 18:49:04.164 +0300 [INFO] (0001:transaction): Loaded plugin embulk-input-sqlserver (0.13.2)
2023-12-04 18:49:04.221 +0300 [INFO] (0001:transaction): Loaded plugin embulk-output-postgresql (0.8.7)
2023-12-04 18:49:04.338 +0300 [WARN] (0001:transaction): "UTC" is recognized as "Z" to be compatible with the legacy style.

Then getting error like that;

org.embulk.exec.PartialExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.embulk.spi.time.Timestamp.ofInstant(Ljava/time/Instant;)Lorg/embulk/spi/time/Timestamp;
    at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:375)
    at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:607)
    at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
    at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:391)
    at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:387)
    at org.embulk.spi.Exec.doWith(Exec.java:25)
    at org.embulk.exec.BulkLoader.run(BulkLoader.java:387)
    at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:180)
    at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:331)
    at org.embulk.EmbulkRunner.run(EmbulkRunner.java:174)
    at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:468)
    at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:100)
    at org.embulk.cli.Main.main(Main.java:28)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.embulk.spi.time.Timestamp.ofInstant(Ljava/time/Instant;)Lorg/embulk/spi/time/Timestamp;
    at org.embulk.exec.BulkLoader$LoaderState.getRepresentativeException(BulkLoader.java:315)
    at org.embulk.exec.BulkLoader.execute(BulkLoader.java:732)
    at org.embulk.exec.BulkLoader.access$300(BulkLoader.java:35)
    at org.embulk.exec.BulkLoader$4$1$1$1.run(BulkLoader.java:568)
    at org.embulk.output.jdbc.AbstractJdbcOutputPlugin.transaction(AbstractJdbcOutputPlugin.java:423)
    at org.embulk.exec.BulkLoader$4$1$1.transaction(BulkLoader.java:560)
    at org.embulk.exec.LocalExecutorPlugin.transaction(LocalExecutorPlugin.java:54)
    at org.embulk.exec.BulkLoader$4$1.run(BulkLoader.java:555)
    at org.embulk.spi.util.Filters$RecursiveControl.transaction(Filters.java:96)
    at org.embulk.spi.util.Filters.transaction(Filters.java:49)
    at org.embulk.exec.BulkLoader$4.run(BulkLoader.java:549)
    at org.embulk.input.jdbc.AbstractJdbcInputPlugin.transaction(AbstractJdbcInputPlugin.java:230)
    at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:544)

I tried changing the drivers, I changed the versions in the gem list.

nnvyjq4y

nnvyjq4y1#

If you using embulk 0.8.38 (this info from GitHub issue) and ask about the error org.embulk.exec.PartialExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodError: org.embulk.spi.time.Timestamp.ofInstant(Ljava/time/Instant;)Lorg/embulk/spi/time/Timestamp; , I suspect you are using too old embulk version, Could you try 0.9.25 or 0.11.2 .

When you use 0.11.2, you need few steps (ex. setup JRuby) https://www.embulk.org/articles/2023/04/13/embulk-v0.11-is-coming-soon.html

相关问题