-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
向含有text字段类型的分表中插入数据时失败 #59
Comments
大家都没有碰到过这个问题吗? |
我也碰到了这个问题 请问有解决方案吗 |
在:com.dangdang.ddframe.rdb.sharding.jdbc.adapter.AbstractPreparedStatementAdapter中临时打了一个小补丁:
|
我也碰到了这个问题 |
修复这个bug的代码会导致使用mybatis自增id出错。 |
我也遇到了 请问这个现在如何解决啊 |
3.0也有这个问题,#{reqMsg,jdbcType=LONGVARCHAR} |
+1 |
对 jdbctype为longvarchar就会报这个错 |
For English only, other languages will not accept. |
MyBatis+MySQL,向含有text字段类型的分表中插入数据数据时失败,异常信息如下:
Caused by: java.sql.SQLException: Invalid argument value: java.io.NotSerializableException
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:937)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:872)
at com.mysql.jdbc.PreparedStatement.setSerializableObject(PreparedStatement.java:3887)
at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:3603)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_setObject(FilterChainImpl.java:2923)
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_setObject(FilterAdapter.java:1298)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_setObject(FilterChainImpl.java:2920)
at com.alibaba.druid.filter.FilterAdapter.preparedStatement_setObject(FilterAdapter.java:1298)
at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_setObject(FilterChainImpl.java:2920)
at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.setObject(PreparedStatementProxyImpl.java:411)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.setObject(DruidPooledPreparedStatement.java:476)
at com.dangdang.ddframe.rdb.sharding.jdbc.ShardingPreparedStatement.setParameters(ShardingPreparedStatement.java:188)
at com.dangdang.ddframe.rdb.sharding.jdbc.ShardingPreparedStatement.routeSQL(ShardingPreparedStatement.java:163)
at com.dangdang.ddframe.rdb.sharding.jdbc.ShardingPreparedStatement.routeIfNeed(ShardingPreparedStatement.java:151)
at com.dangdang.ddframe.rdb.sharding.jdbc.ShardingPreparedStatement.getRoutedPreparedStatements(ShardingPreparedStatement.java:138)
at com.dangdang.ddframe.rdb.sharding.jdbc.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:107)
Caused by: java.io.NotSerializableException: java.io.StringReader
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at com.mysql.jdbc.PreparedStatement.setSerializableObject(PreparedStatement.java:3876)
The text was updated successfully, but these errors were encountered: