Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
APIでDBにinsert、select、deleteができるようにしたいです。
しかし、複数のデータをinsertしようとすると
Exception in component tRESTResponse_2 (api)
java.lang.RuntimeException: Rest response already sent.
at usecase.api_0_1.api.tWriteJSONField_1_InProcess(api.java:8799)
at usecase.api_0_1.api$1ThreadXMLField_tWriteJSONField_1_Out.run(api.java:3892)
このようにエラーが出てきます。
作成したジョブ
送信内容
・tLogRow8の結果
.--+----.
|tLogRow_8|
|=-+---=|
|id|name|
|=-+---=|
|4 |fuji|
|5 |fuji|
'--+----'
・DBには2レコード作成されています。
■できていること
・単一のレコードでは正常に動く。
送信するbodyを
{
"root":[
{
"id":"4",
"name":"fuji"
}
]
}
にした場合はエラーとならない。
■できていないこと
・複数レコードを送信した場合、tRESTResponseでエラーとなる。
■予想
tWriteJSONFieldの設定がおかしいのかなと考えております。
tWriteJSONFieldの現在の設定
よろしくお願いいたします。
・tXMLMapの設定を以下の記事を参考にして[All in one] (オールインワン)をtrueにして解決しました。
https://community.talend.com/s/feed/0D53p00007vCoxwCAC?language=ja
https://help.talend.com/r/ja-JP/7.3/txmlmap/txmlmap-tfileinputxml-tlogrow-tfileoutputxml-configuring-txmlmap-with-multiple-loops-standard-component
・tWriteJSONFieldの設定を以下の記事を参考にloopを追加して解決しました。
https://help.talend.com/r/ja-JP/7.3/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-configuring-and-running-job-create
・tXMLMapの設定を以下の記事を参考にして[All in one] (オールインワン)をtrueにして解決しました。
https://community.talend.com/s/feed/0D53p00007vCoxwCAC?language=ja
https://help.talend.com/r/ja-JP/7.3/txmlmap/txmlmap-tfileinputxml-tlogrow-tfileoutputxml-configuring-txmlmap-with-multiple-loops-standard-component
・tWriteJSONFieldの設定を以下の記事を参考にloopを追加して解決しました。
https://help.talend.com/r/ja-JP/7.3/processing/twritejsonfield-tmap-trowgenerator-trowgenerator-configuring-and-running-job-create