数据库连接失败 Code-set conversion function failed due to illegal sequence or invalid value.

数据库连接失败

Code-set conversion function failed due to illegal sequence or invalid value.

Caused by: java.sql.SQLException: com.informix.asf.IfxASFException: Code-set conversion function failed due to illegal sequence or invalid value.
at com.informix.jdbc.IfxSqliConnect.(IfxSqliConnect.java:1691)
at sun.reflect.GeneratedConstructorAccessor31.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:206)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)

1. 检查工作空间编码

2. 检查tomcat、项目、ide、jar包是否存在中文路径。

我遇到了两次,一次是tomcat有中文路径
第二次是Junit jar有中文路径。很坑!

分享出来供大家参考!

你可能感兴趣的:(bug记录)