insert into PICTUREDATA(id,data) values(....)
8 回复
改成这样试试
sqlList.params().set("pdata", image);
// 改成
sqlList.params().set("pdata", new SerialBlob(image));
Caused by: java.sql.SQLException: Error
at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1180)
at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:127)
at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:68)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.setBlob(DruidPooledPreparedStatement.java:596)
at org.nutz.dao.impl.jdbc.BlobValueAdaptor.set(BlobValueAdaptor.java:35)
at org.nutz.dao.impl.sql.run.NutDaoExecutor._runPreparedStatement(NutDaoExecutor.java:266)
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:82)
... 49 more
Caused by: java.lang.ClassCastException: javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB
at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:7193)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBlob(OraclePreparedStatementWrapper.java:137)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.setBlob(DruidPooledPreparedStatement.java:594)
... 52 more
这样好像不行
添加回复
请先登陆