20
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Embulkのエラーメッセージからエラーの原因を特定するための参考エラーメッセージ

Last updated at Posted at 2016-07-11

Embulkのエラーメッセージからエラーの原因を特定するための参考エラーメッセージ

※ エラーメッセージがわかりやすくなるまでの暫定

まとめ

エラーの内容は結局Can not deserialize instance of java.lang.String out of START_OBJECTのところに注目し

Can not deserialize instance of Embulkが期待している型 of 間違っている型というふうに読めば良いようです。

また、プラグインがJRubyで書かれている場合は、Invalid value for :hashのところに注目し、Invalid value for 期待している型と読めばよいようです。

Can not deserialize instance of java.lang.String out of START_OBJECT

org.embulk.exec.PartialExecutionException: org.embulk.config.ConfigException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: N/A; line: -1, column: -1]
    at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(org/embulk/exec/BulkLoader.java:363)
    at org.embulk.exec.BulkLoader.doRun(org/embulk/exec/BulkLoader.java:572)
    at org.embulk.exec.BulkLoader.access$000(org/embulk/exec/BulkLoader.java:33)
    at org.embulk.exec.BulkLoader$1.run(org/embulk/exec/BulkLoader.java:374)
    at org.embulk.exec.BulkLoader$1.run(org/embulk/exec/BulkLoader.java:370)
    at org.embulk.spi.Exec.doWith(org/embulk/spi/Exec.java:25)
    at org.embulk.exec.BulkLoader.run(org/embulk/exec/BulkLoader.java:370)
    at org.embulk.EmbulkEmbed.run(org/embulk/EmbulkEmbed.java:180)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
    at RUBY.run(/Users/user/.embulk/bin/embulk!/embulk/runner.rb:84)
    at RUBY.run(/Users/user/.embulk/bin/embulk!/embulk/command/embulk_run.rb:306)
    at RUBY.<top>(/Users/user/.embulk/bin/embulk!/embulk/command/embulk_main.rb:2)

Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token

org.embulk.exec.PartialExecutionException: org.embulk.config.ConfigException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token
 at [Source: N/A; line: -1, column: -1]
    at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(org/embulk/exec/BulkLoader.java:363)
    at org.embulk.exec.BulkLoader.doRun(org/embulk/exec/BulkLoader.java:572)
    at org.embulk.exec.BulkLoader.access$000(org/embulk/exec/BulkLoader.java:33)

org.jruby.proxy.org.embulk.config.ConfigException$Proxy1: Invalid value for :hash

org.embulk.exec.PartialExecutionException: org.jruby.proxy.org.embulk.config.ConfigException$Proxy1: Invalid value for :hash
        at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(BulkLoader.java:340)
        at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:566)
        at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35)
        at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353)
        at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350)
        at org.embulk.spi.Exec.doWith(Exec.java:22)
        at org.embulk.exec.BulkLoader.run(BulkLoader.java:350)
        at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:178)
        at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:292)
        at org.embulk.EmbulkRunner.run(EmbulkRunner.java:156)
        at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:433)
        at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:90)
        at org.embulk.cli.Main.main(Main.java:64)

ハッシュで書くべきところ、配列にしてしまっていてた。

間違い

# 間違い
   time_partitioning:
   - {type: DAY}
   - {require_partition_filter: true}

# 正しい
  time_partitioning: {type: DAY, require_partition_filter: true}

その他

$ embulk example foo
2021-05-18 21:51:37.106 +0900: Embulk v0.9.23
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.cli.Option.builder(Ljava/lang/String;)Lorg/apache/commons/cli/Option$Builder;
at org.embulk.deps.cli.OptionDefinitionImpl.<init>(http://OptionDefinitionImpl.java:22)
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

多分古いJDKを使っていると起きるエラーembulk 0.9.17以降を使うと発生する

参考

開発編

java.lang.ClassCastException: java.lang.String cannot be cast to org.embulk.standards.CsvParserPlugin$QuoteCharacter

Jacksonのバージョンがコンフリクトすると出るらしい。参考

20
9
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?