Mikael wrote:
ps.setBinaryStream( 1, is, data.length);
[snip rest of the program]
A workaround seems to be to use ps.setBinaryStream without the length
parameter.
ps.setBinaryStream( 1, is);
Here is the old error output at revision 438478 before SSL was added
which was more helpful: (I don't know if maybe we have an issue with the
message we are getting with protocol errors in 10.3)
[C:/kmarsden/repro/bigblob] java TestBlob
Exception in thread "main" java.sql.SQLException: Network protocol
error: end of stream prematurely reached, parameter #
1. Remaining data has been padded with 0x0.
at
org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46)
at
org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:345)
at
org.apache.derby.client.am.PreparedStatement.executeUpdate(PreparedStatement.java:389)
at TestBlob.main(TestBlob.java:28)
Caused by: org.apache.derby.client.am.SqlException: Network protocol
error: end of stream prematurely reached, parameter
#1. Remaining data has been padded with 0x0.
at
org.apache.derby.client.net.Request.writePlainScalarStream(Request.java:467)
at
org.apache.derby.client.net.Request.writeScalarStream(Request.java:242)
at
org.apache.derby.client.net.NetStatementRequest.buildEXTDTA(NetStatementRequest.java:855)
at
org.apache.derby.client.net.NetStatementRequest.writeExecute(NetStatementRequest.java:145)
at
org.apache.derby.client.net.NetPreparedStatement.writeExecute_(NetPreparedStatement.java:172)
at
org.apache.derby.client.am.PreparedStatement.writeExecute(PreparedStatement.java:1557)
at
org.apache.derby.client.am.PreparedStatement.flowExecute(PreparedStatement.java:1803)
at
org.apache.derby.client.am.PreparedStatement.executeUpdateX(PreparedStatement.java:394)
at
org.apache.derby.client.am.PreparedStatement.executeUpdate(PreparedStatement.java:380)
... 1 more
This sounds kind of similar to DERBY-2017, but in this case the length
is actually correct so I think this is a separate issue.
Kathey