私はテラデータDBにデータを挿入する必要があるスプリングブートアプリケーションに取り組んでいます。 私のテーブルには3つの列で構成されています。id、idとnameはVARCHARある名前、Json_data は、Json_dataは、私は完全に作業しているCLOB として文字列型とJSON_dataとしてIDと名前を持つPOJOクラスを持つJSONspring-bootを使用してteradataにJSONを挿入する
です郵便配達
2017-09-06 05:39:29.186 WARN 15516 --- [nio-9090-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not construct instance of java.sql.Clob: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.sql.Clob: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: [email protected]; line: 9, column: 15] (through reference chain: com.model.SampleModel["jsondata"])
からデータを挿入することは、誰もが私の残りのAPI私のJSONのルックスからのサンプルデータを挿入するための最良の方法である説明できている間、私は次のエラーを取得しています
(オペレーションをGET)データをretrive以下のようになります。
{
"id": "23",
"name": "Navatha",
"jsondata": "{\"Notes\": \"sample Note\",\"BU\": \"BFS\",\"NumberOfFields\": \"4\"}"
}
この溶液に見てhttps://stackoverflow.com/questions/34906458/create-clob-property-from-jsonたくさん – cralfaro
感謝..それは働いた – navatha
私はちょうどcomunityからの他の人のために有用であるためにここに応答を加えました – cralfaro