shardingsphere icon indicating copy to clipboard operation
shardingsphere copied to clipboard

java.io.NotSerializableException: java.io.StringReader

Open xfyang1989 opened this issue 7 years ago • 2 comments

When I insert data into a field of text type in the database, I report the following error. It seems that sharding has rewritten this field. How to solve this problem?

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:3824) at io.shardingsphere.shardingjdbc.jdbc.adapter.invocation.JdbcMethodInvocation.invoke(JdbcMethodInvocation.java:47) at io.shardingsphere.shardingjdbc.jdbc.adapter.AbstractShardingPreparedStatementAdapter.replaySetParameter(AbstractShardingPreparedStatementAdapter.java:264) at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.setParametersForStatements(ShardingPreparedStatement.java:194) at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.initPreparedStatementExecutor(ShardingPreparedStatement.java:189) at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:136)

xfyang1989 avatar Apr 10 '19 09:04 xfyang1989

Duplicate with https://github.com/apache/incubator-shardingsphere/issues/1567. Will be fixed together.

tuohai666 avatar Apr 10 '19 09:04 tuohai666

Fixed via https://github.com/apache/incubator-shardingsphere/pull/2388.

tuohai666 avatar May 16 '19 02:05 tuohai666