错误:
------------------------------------------------------
java.io.IOException: 必须登录到服务器
oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:717)
oracle.jdbc.driver.OracleBlobInputStream.needBytes(OracleBlobInputStream.java:249)
oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.java:113)
com.yss.serve.UpfileServlet.doPost(UpfileServlet.java:64)
com.yss.serve.UpfileServlet.doGet(UpfileServlet.java:80)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
com.yss.serve.CheckLoginFilter.doFilter(CheckLoginFilter.java:35)
------------------------------------------------------
代码:
------------------------------------------------------
jdbcTemplate.query(sql, new Object[] {id},new ResultSetExtractor() {
public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
rs.next();
InputStream ins = lobHandler.getBlobAsBinaryStream(rs,"Ffj");
return ins;
}
});
if (ret != null){
((InputStream)ret).read();//只要InputStream执行read()方法 就会报错
retrun null;
}
------解决方案--------------------
------解决方案--------------------