Blob not found (Java)
Posted in 2010
Topics: Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
Hello, my Java-Applet download files from the database and save them into the filesystem. But when my client is behind a proxy (and the connection is passed through a tomcat) I can only download files up to 8 Kb. Downloading bigger files cause an Exception: Blob not found. Changes in the configuration of the tomcat had no effect. Here is the Java-Code: ++++++++++++++++++++++++++++++++++++++++++++++++++ String sql = "SELECT id, file, filename " + "FROM filetable " + "WHERE id = ?"; try { PreparedStatement stmt = connection.prepareStatement(sql); stmt.setInt( 1 , _JobID); java.sql.ResultSet rs = stmt.executeQuery() if (rs.next()) { _JobID = rs.getInt("id"); _ImageFileName = (rs.getString("filename")).trim(); _ImageBytesOfFile = rs.getBytes("file"); // <-- CAUSE EXCEPTION } rs.close(); stmt.close(); } catch (Exception e) {...} ++++++++++++++++++++++++++++++++++++++++++++++++++ Exception: java.sql.SQLException: Blob not found at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:400) at com.informix.jdbc.IfxResultSet.blobCheck(IfxResultSet.java:1718) at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:691) at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:631) at com.informix.jdbc.IfxResultSet.getBytes(IfxResultSet.java:1190) ...... Any idea what I can do to download bigger files behind a Proxy (with Tomcat)? Thanks Rafael
On 18.05.10 09:39, RAFAEL GRUNENBERG wrote: > ++++++++++++++++++++++++++++++++++++++++++++++++++ > > Exception: > > java.sql.SQLException: Blob not found > at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:400) > at com.informix.jdbc.IfxResultSet.blobCheck(IfxResultSet.java:1718) > at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:691) > at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:631) > at com.informix.jdbc.IfxResultSet.getBytes(IfxResultSet.java:1190) > > ....... > > Any idea what I can do to download bigger files behind a Proxy (with Tomcat)? > > Thanks > Rafael > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > > The rest of the stack trace could be helpful to resolve this. Does it look like this http://www-01.ibm.com/support/docview.wss?uid=swg21232363? I'd guess that 8 kByte is the limit for in memory transfer and the problem arises as soon as a temporary file is used for data transfer. Read http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jd bc_pg.doc/jdbc201.htm to see how to change or switch off the limit.