上传ORACLE的问题~急!!!
用jspsmartupload将文件上传至服务器,然后在服务器端将文件写入ORACLE时出错
java.sql.SQLException: Io 异常: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2061)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
但是上传一个几K大小的文件则不会出错,只要文件大小大于几K就会报上面的错
文件可以传到服务器端.代码如下:
<%@ page language= "java " import= "java.util.* " pageEncoding= "gb2312 "%>
<%@ page import = "com.jspsmart.upload.* " %>
<%@ page import = "java.sql.* " %>
<%@ page import = "com.oa.common.* " %>
<%@ page import = "com.oa.dbase.* " %>
<jsp:useBean id = "fm " class = "com.oa.webfolder.FileManage " scope = "request " />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN ">
<html>
<head>
<title> My JSP 'doupload.jsp ' starting page </title>
<meta http-equiv= "pragma " content= "no-cache ">
<meta http-equiv= "cache-control " content= "no-cache ">
<meta http-equiv= "expires " content= "0 ">
<meta http-equiv= "keywords " content= "keyword1,keyword2,keyword3 ">
<meta http-equiv= "description " content= "This is my page ">
<!--
<link rel= "stylesheet " type= "text/css " href= "styles.css ">
-->
</head>
<body>
<%
try{
// 新建一个SmartUpload对象
SmartUpload su = new SmartUpload();
// 上传初始化
su.initialize(pageContext);
//su.setAllowedFilesList( "doc,txt,jpg ");
su.setMaxFileSize(200*1024*1024);
su.setTotalMaxFileSize(200*1024*1024*20000);
su.upload();
String parentid = (String)su.getRequest().getParameter( "parentid ");
for(int i=0;i <su.getFiles().getCount();i++){
File tFile = su.getFiles().getFile(i);