最近在使用Greenplum ,用greenplum_jdbc_5.1.4 驱动时偶然出现
[Pivotal][Greenplum JDBC Driver][Pivotal][Greenplum JDBC Driver](Internal Error) Message 1001 not found 异常。
一通查询所得资料甚少,开始一直认为多数据源切换时,连接没有自动重连问题,但是测试时通过断网等手段发现在连接断开时
的异常并不是org.springframework.jdbc.UncategorizedSQLException: StatementCallback; 由于Spring中
DatabaseDriver里面并没有Greenplum 的驱动定义,考虑更换驱动 POSTGRESQL来操作Greenplum 。依赖包如下: <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>42.2.5</version>
测试过程中,又出现新的问题,当sql中入参与数据库中字段类型不符时:
org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying
No operator matches the given name and argument type(s). You might need to add explicit type casts.
而同样的sql在使用greenplum_jdbc_5.1.4 驱动执行时却是正常的。
虽说使用||''方式将字段与操作类型进行了统一解决bug,问题原因并没有深查。
以上提到的greenplum_jdbc_5.1.4 存在网盘
https://pan.baidu.com/s/1flRUVhzeKmAMaVr2TJr9uQ
提取码:d4ts