【Java报错】Greenplum数据库报错 Value can not be converted to requested type 问题解决(踩坑分享)
生活随笔
收集整理的這篇文章主要介紹了
【Java报错】Greenplum数据库报错 Value can not be converted to requested type 问题解决(踩坑分享)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1. 問題說明
測(cè)試接口時(shí),保存數(shù)據(jù)報(bào)錯(cuò) [Pivotal][Greenplum JDBC Driver]Value can not be converted to requested type. 參數(shù)類型是Map,下邊是簡(jiǎn)化后的mapper里的SQL,是不是看起來平平無奇,😁那你就錯(cuò)了:
<insert id="insertEquip" parameterType="java.util.Map">insert into equip621 (id, name, age, equip) values (#{id}, #{name}, #{age}, #{equip}) </insert>我嘗試了以下操作都沒能解決問題:
2. 解決方法
說實(shí)話,我摸不到頭腦了,現(xiàn)在唯一沒改的就是表名稱了,我把表名稱改了一下:
<insert id="insertEquip" parameterType="java.util.Map">insert into equip_table (id, name, age, equip) values (#{id}, #{name}, #{age}, #{equip}) </insert>成功了!!!😭😭😭 我又測(cè)試了一下這樣的表名稱:
<insert id="insertEquip" parameterType="java.util.Map">insert into equip_621 (id, name, age, equip) values (#{id}, #{name}, #{age}, #{equip}) </insert>還是可以的。
3. 總結(jié)
這個(gè)表名稱equip621是Oracle數(shù)據(jù)庫的表,mapper文件也使用的是之前的,看來是Greenplum數(shù)據(jù)庫的規(guī)范問題。
總結(jié)
以上是生活随笔為你收集整理的【Java报错】Greenplum数据库报错 Value can not be converted to requested type 问题解决(踩坑分享)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux环境】SSH突然无法连接【排
- 下一篇: 【Java报错】Greenplum数据库