java.sql.SQLException: No operations allowed after statement closed问题 [问题点数:50分]

Bbs1
本版专家分:0
结帖率 60%
Bbs5
本版专家分:3034
Blank
黄花 2018年12月 Java大版内专家分月排行榜第二
Bbs5
本版专家分:4252
Bbs4
本版专家分:1954
Blank
蓝花 2018年12月 Java大版内专家分月排行榜第三
java 项目中遇到的错误
Unknown column 'fillMen' in 'field list' java.sql.SQLException: Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em> java.sql.SQLException: QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in
Spring hibernate mysql No operations allowed after statement closed
sessionFactory spring中配置的sessionfactory代码 [code=text]rn rn rn rn com.wds.registration.modelrn com.jmy.essay.modelrn com.jmy.picture.modelrn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn truern updatern rn rn rn[/code]rn后台有个调用[code=java] public class JEssayLogic rn rn private SessionFactory sessionFactory;rnrn rn public E_ML find(E_ML e_ML) rn rn Session session = sessionFactory.openSession();rn rn Query query = session.createQuery("SQL...................");rn rn List l = query.list();rn rn session.close();rn sessionFactory.close();rn return e_ML;rn rnrn rn [/code] 但是web程序连接长了 程序就会报[code=text]com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No <em>operations</em> <em>allowed</em> <em>after</em> <em>statement</em> <em>closed</em>.rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)rn at com.mysql.jdbc.Util.getInstance(Util.java:386)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)rn at com.mysql.jdbc.StatementImpl.checkClosed(StatementImpl.java:461)rn at com.mysql.jdbc.StatementImpl.getMaxRows(StatementImpl.java:2216)rn at org.apache.commons.dbcp.DelegatingStatement.getMaxRows(DelegatingStatement.java:237)rn at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:298)rn at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)rn at org.hibernate.loader.Loader.getResultSet(Loader.java:1967)rn at org.hibernate.loader.Loader.doQuery(Loader.java:802)rn at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)rn at org.hibernate.loader.Loader.doList(Loader.java:2542)rn at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)rn at org.hibernate.loader.Loader.list(Loader.java:2271)rn at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)rn at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)rn at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)rn at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)rn at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)rn at com.jmy.logic.JEssayLogic.find(JEssayLogic.java:164)rn at com.jmy.service.impl.JEManagerImpl.find(JEManagerImpl.java:46)rn at com.jmy.action.JmyOnePage.loadPage(JmyOnePage.java:38)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)[/code]这个错 goolge了一下 说是mysql断开一个长时没有响应的连接 我现在有个疑问 我已经把session都关闭了 再次访问的时候应该不存在长时间无响应 应该是重新创建session 为什么还会报上面的错
求助:MYSQL出错:java.sql.SQLException: No operations allowed after connection closed
web应用平台是apache2.51 + tomcat4.1.30 ,采用mysql数据库,都在一台机器上,在并发100以下用户时不会出现任何<em>问题</em>,但在做5次100并发测试时,tomcat控制台报错rnrnjava.sql.SQLException: No <em>operations</em> <em>allowed</em> <em>after</em> connection <em>closed</em>rnrn进入mysql时发现rnMax_used_connections | 90 rn而mysql的最大连接数据是500,远远高于90,rnshow processlist;也只有50左右rn数据库的连接池的大小是400,rnrnshow status;状态如下:rn| Max_used_connections | 90 |rn| Not_flushed_key_blocks | 0 |rn| Not_flushed_delayed_rows | 0 |rn| Open_tables | 142 |rn| Open_files | 170 |rn| Open_streams | 0 |rn| Opened_tables | 148 |rn| Questions | 212930 |rn| Qcache_queries_in_cache | 1083 |rn| Qcache_inserts | 31126 |rn| Qcache_hits | 135176 |rn| Qcache_lowmem_prunes | 0 |rn| Qcache_not_cached | 1391 |rn| Qcache_free_memory | 15118992 |rn| Qcache_free_blocks | 319 |rn| Qcache_total_blocks | 2523 |rn| Rpl_status | NULL |rn| Select_full_join | 33886 |rn| Select_full_range_join | 0 |rn| Select_range | 13714 |rn| Select_range_check | 0 |rn| Select_scan | 3236 |rn| Slave_open_temp_tables | 0 |rn| Slave_running | OFF |rn| Slow_launch_threads | 0 |rn| Slow_queries | 1 |rn| Sort_merge_passes | 0 |rn| Sort_range | 9654 |rn| Sort_rows | 239147 |rn| Sort_scan | 8136 |rn| Table_locks_immediate | 98411 |rn| Table_locks_waited | 549 |rn| Threads_cached | 2 |rn| Threads_created | 7428 |rn| Threads_connected | 53 |rn| Threads_running | 1 |rn| Uptime | 4294855340 |rnrn rnrn谁能告诉我是哪出了<em>问题</em>撒,在此谢过了......
No operations allowed after statement closed.错误-求助
请问一般No <em>operations</em> <em>allowed</em> <em>after</em> <em>statement</em> <em>closed</em>.是什么错误?rn报错如下:rnjava.sql.SQLException: No <em>operations</em> <em>allowed</em> <em>after</em> <em>statement</em> <em>closed</em>.rn at com.mysql.jdbc.Statement.checkClosed(Statement.java:277)rn at com.mysql.jdbc.Statement.executeQuery(Statement.java:870)rn at Display.main(Display.java:92)rn源程序rnsql="select * From Student";rnrn //read resultrnrntry rn ResultSet rs=stmt.executeQuery(sql);rnwhile(rs.next())rnrnrnrnString AgentName=rs.getString(1);rnrnSystem.out.println(AgentName+" ");rnrnrnrs.close();rnstmt.close();rnrn rn catch (Exception e) rn System.out.println("exceptin in excute the query!");rn e.printStackTrace(); rnrnrnrn是控制流的错误么?rnPS. 关于SQL语句肯定没错。。。
java.sql.SQLException: No operations allowed after connection closed.
package com.guikai.chenli;rnrnimport java.sql.*;rnimport com.mysql.jdbc.Driver;rnrnpublic class Conn rn Connection connection=null;rn public Conn()rn try rn Class.forName("com.mysql.jdbc.Driver").newInstance();rn catch (InstantiationException e) rn e.printStackTrace();rn catch (IllegalAccessException e) rn e.printStackTrace();rn catch (ClassNotFoundException e) rn e.printStackTrace();rn rn// String serverIP="121.199.28.34";rn// String dbName="zkh0y1_db";rn// String userName="zkh0y1";rn// String userPasswd="s8i2r7j8";rnrn String serverIP="127.0.0.1";rn String dbName="renda";rn String userName="root";rn String userPasswd="111111";rnrn try rn connection=DriverManager.getConnection("jdbc:mysql://"+serverIP+"/"+dbName+"?autoReconnect=true",userName,userPasswd);rn catch (SQLException e) rn //System.out.println("----------");rn e.printStackTrace();rn rn rn rn rn public void close()rn if(connection!=null)rn try rn connection.close();rn catch (SQLException e) rn e.printStackTrace();rn rn rnrn public void exe(String sql)rn Statement stmt=null;rn try rn stmt = connection.createStatement();rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn try rn stmt.executeUpdate(sql);rn catch (SQLException e) rn e.printStackTrace();rn rn try rn if(stmt!=null)rn stmt.close();rn catch (SQLException e) rn e.printStackTrace();rn rn rnrn public ResultSet query(String sql)rn Statement stmt=null;rn ResultSet rs=null;rn try rn stmt = connection.createStatement();rn catch (SQLException e) rn e.printStackTrace();rn rn try rn rs=stmt.executeQuery(sql);rn catch (SQLException e) rn e.printStackTrace();rn rn return rs;rn rnrnrnrnrnrn老出现java.sql.SQLException: No <em>operations</em> <em>allowed</em> <em>after</em> connection <em>closed</em>.错误,谁知道怎么解决
java.sql.SQLException: Operation not allowed after ResultSet closed
[code=Java]rnrnpackage com.gunxue.servlet;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.security.MessageDigest;rnimport java.security.NoSuchAlgorithmException;rnimport java.sql.Connection;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnimport java.sql.Statement;rnimport java.text.DateFormat;rnimport java.util.Date;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport org.apache.commons.logging.Log;rnimport org.apache.commons.logging.LogFactory;rnrn//import com.xifan.db.DB;rnimport com.gunxue.pushHttp.PushTask;rnimport com.gunxueapi.test.ConnectionPool;rnrn@SuppressWarnings("serial")rnpublic class Push extends HttpServlet rn private static final Log log = LogFactory.getLog(Push.class);rn public void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rnrn doPost(request, response);rn rnrn public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn request.setCharacterEncoding("utf-8");rn response.setContentType("text/html; charset=utf-8");rn PrintWriter out = response.getWriter();rnrn // 从url里得到得到用户名rn String cpid = request.getParameter("name");rn // 从url里得到密码rn String cppwd = request.getParameter("password");rn // 从url里得出电话rn String mobile = request.getParameter("phone");rn // 从url里得出内容rn String msgcontent = request.getParameter("mtContent");rn // 从URL里得到服务代码rn String spnumber = request.getParameter("spnumber");rn //取得当前时间rn Date date = new Date();rn DateFormat d2 = DateFormat.getDateTimeInstance(); rn String str2 = d2.format(date); rn /*rn * 服务器端rn */rn try rn String SQL = "select cpid,cppwd from userinfo where count>0";rn ConnectionPool pool = null;rn pool = ConnectionPool.getInstance();rn Connection conn = pool.getConnection();rn Statement stmt = conn.createStatement();rn ResultSet rs = stmt.executeQuery(SQL);rn while (rs.next()) rn String m5pwd=Push.Md5(rs.getString(2));rn if (cpid != null && !cpid.equals("")) rn if (rs.getString(1).equals(cpid.trim())) rn if (cppwd != null && !cppwd.equals("")) rn if (m5pwd.equals(cppwd.trim())) rn if (mobile != nullrn && !mobile.equals("")) rn if (msgcontent != nullrn && !msgcontent.equals("")) rn String resp = PushTask.work(mobile.trim(),msgcontent.trim());rn if (!resp.trim().equals("0")) rn SQL = "insert into pushcontent(cpid,mobile,content,spnumber,cpdatetime,flag) value('"rn + cpid.trim()rn + "','"rn + mobile.trim()rn + "','"rn + msgcontent.trim()rn + "','"rn + spnumberrn + "','"rn + str2rn + "',1)";rn stmt.executeUpdate(SQL);rn SQL = "update userinfo set count=count-1 where cpid='"rn + cpid.trim() + "'";rn stmt.executeUpdate(SQL);rn rn out.println("0");rn rn rn else rn SQL = "insert into pushcontent(cpid,mobile,content,spnumber,cpdatetime,flag) value('"rn + cpid.trim()rn + "','"rn + mobile.trim()rn + "','"rn + msgcontent.trim()rn + "','"rn + spnumberrn + "','"rn + str2rn + "',0)";rn stmt.executeUpdate(SQL);rn out.println("007");rn rn else rn out.println("006");// 内容为空rn rn else rn out.println("005");// 号码为空rn rn else rn out.println("004");// 密码不正确rn rn else rn out.println("003");// 密码为空rn rn else rn out.print("002");// 用户名不存在rn rn else rnrn out.println("001");// 没有填写用户名rn rn // log.info("["+ip+"]"+cpid+"/"+cppwd+""+mobile+""+msgcontent+"#"+spnumber+"#");rn rn rs.close();rn stmt.close();rn pool.release(conn);rn pool.closePool();rn catch (SQLException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn catch (Exception e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rnrn private static String Md5(String m5pwd) rn String m5pw="";rn try rn MessageDigest md = MessageDigest.getInstance("MD5");rn md.update(m5pwd.getBytes());rn byte b[] = md.digest();rn int i;rn StringBuffer buf = new StringBuffer("");rn for (int offset = 0; offset < b.length; offset++) rn i = b[offset];rn if (i < 0)rn i += 256;rn if (i < 16)rn buf.append("0");rn buf.append(Integer.toHexString(i));rn rn m5pw=buf.toString().substring(8, 24);rn //System.out.println(m5pw);rn catch (NoSuchAlgorithmException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn return m5pw;rn rnrnrnrn[/code]rnrn报这个异常:rnjava.sql.SQLException: Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em>rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)rn at com.mysql.jdbc.ResultSet.checkClosed(ResultSet.java:655)rn at com.mysql.jdbc.ResultSet.next(ResultSet.java:7302)rn at com.gunxue.servlet.Push.doPost(Push.java:65)rn at com.gunxue.servlet.Push.doGet(Push.java:32)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)rn at java.lang.Thread.run(Thread.java:619)rn
关于JDBC中No operations allowed after connection closed问题
rn[code=Java]public static Operater check(String name, String password) rn Operater operater=new Operater();//操作员信息对象rn String sql = "select * from tb_operator where name='" + namern + "' and password='" + password + "'and admin=1";//查询字符串rn ResultSet rs = Dao.executeQuery(sql);//执行查询rn try rn while (rs.next()) //如果查询到了记录rn operater.setId(rs.getString("id"));//设置操作员编号rn operater.setName(rs.getString("name"));//设置操作员用户名rn operater.setGrade(rs.getString("admin"));//设置操作员等级rn operater.setPassword(rs.getString("password"));//设置管理员密码rn rn catch (Exception e) rn e.printStackTrace();rn rn Dao.close(); //关闭连接对象rn return operater;//返回操作员信息对象rn [/code]rnrn第一次调用此方法没<em>问题</em> 可第二次就出现下面的<em>问题</em>rnrncom.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: rnNo <em>operations</em> <em>allowed</em> <em>after</em> connection <em>closed</em>rnrn这个<em>问题</em>怎么解决啊 只有把Dao.close();这个关闭Connection的方法去掉,可是这样好像也不对啊?rn各位有没有碰到过类似的<em>问题</em>,有好的解决办法?
求助:关于java.sql.SQLException: Operation not allowed after ResultSet closed问题
我的源代码如下rnrnrnrnrnrn rn rn rn rn回复信息提示:(点击信息标题可以直接进入)rn rnrn 对 "> 信息做了回复 ()。 rn rn rn退回信息提示:(点击信息标题可以直接进入)rn rnrn 信息被退回 ()。 rn rn rnrn rnrnrn<%rnrs2.close();rnrs2=null;rnps2.close();rnps2=null;rnrs.close();rnrs=null;rnps.close();rnps=null;rndbconn.closeconnection();rnconn=null;rnout.println(commhtml.HtmlTail());rncommhtml=null;rnrn目前的<em>问题</em>是,我是读取了两遍数据库,也是使用两个PreparedStatement 和两个ResultSet 来做的,但是它有时候就好使,没有<em>问题</em>,有时候刷新的话 就会出现java.sql.SQLException: Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em>的错误,改了好多遍,都不知道错误在哪里,哪位大哥知道啊。愁死了!rnrn十万分感谢啊!
在写servlet时连接数据库出现No operations allowed after connection closed
我在做上传图片到服务器然后数据库存这个图片的地址,下面name是传递过来的图片的地址,第一次能正确存进去,后面再也存不进去,并出现题目的错误rn[code=java]rnpackage uploadPack;rnrnimport java.sql.Connection;rnimport java.sql.PreparedStatement;rnimport java.sql.ResultSet;rnrnpublic class ItemManager rn public void uploadItemImage(String itemNo,String name)rn Connection conn=null;rn PreparedStatement stmt=null;rn ResultSet rs=null;rn tryrn conn=DBHelper.getConnection();rn stmt=conn.prepareStatement("INSERT pictures(picture) VALUES(?)");rn stmt.setString(1, name);rn stmt.executeUpdate();rn catch (Exception ex) rn ex.printStackTrace();rn finally rn DBHelper.close(rs, stmt, conn);rn rn rnrn[/code]rn下面是加载和创建数据库的类rn[code=java]rnpackage uploadPack;rnrnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.ResultSet;rnimport java.sql.Statement;rnrnpublic class DBHelper rn rn //静态代码块来加载驱动rn static rn tryrn String driverName="com.mysql.jdbc.Driver";rn Class.forName(driverName);rn catch(Exception e)rn e.printStackTrace();//打印异常输出rn rn rn rn //连接到指定的数据库,三个参数分别是数据库地址,账号,密码rn public static Connection getConnection()rn Connection conn=null;rn tryrn conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/Demos", "root", "root");rn catch(Exception e)rn e.printStackTrace();rn rn return conn;rn rn rn //关闭数据库连接rn public static void close(ResultSet rs,Statement stmt,Connection conn)rn tryrn if(rs!=null)rn rs.close();rn catch(Exception ex)rn ex.printStackTrace();rn rn rn tryrn if(stmt!=null)rn stmt.close();rn catch(Exception ex)rn ex.printStackTrace();rn rn rn tryrn if(conn!=null)rn conn.close();rn catch(Exception ex)rn ex.printStackTrace();rn rn rnrn[/code]rnrn这个<em>问题</em>我在CSDN上看到原因,但不理解,我想知道我这个怎么改~
TOMCAT配置MYSQL连接池出现No operations allowed after connection closed
在TOMCAT4里配置MYSQL连接池后,系统持续运行不会出现<em>问题</em>,但如果几分钟没操作就会出现No <em>operations</em> <em>allowed</em> <em>after</em> connection <em>closed</em>异常。rn我仔细检查过URL,已经设置了autoReconnect=true,maxWait也设为-1(无限时等待)。rn请问为什么会出现这种错误?有什么要注意吗?rn谢谢
TOMCAT配置MYSQL连接池,出现No operations allowed after connection closed
在TOMCAT4里配置MYSQL连接池后,系统持续运行不会出现<em>问题</em>,但如果几分钟没操作就会出现No <em>operations</em> <em>allowed</em> <em>after</em> connection <em>closed</em>异常。rn我仔细检查过URL,已经设置了autoReconnect=true,maxWait也设为-1(无限时等待)。rn请问为什么会出现这种错误?有什么要注意吗?rn谢谢
Operation not allowed after ResultSet closed
我有一个<em>问题</em>就是,我的RS与Stmt没有交错使用为什么会出现这个错误呢?小弟先在些谢过了rn错误:Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em>rnrn在StrutsAction中调用Page p=new Page();p.SelectRS("select id,username from user", "where id=back)rn rn return num;rn rn return (num+1);rn rnrnrn
org.apache.jasper.JasperException: Operation not allowed after ResultSet closed
相关流程:[code=Java]public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn HttpSession mySession = request.getSession(true);rn mySession.setAttribute("errMsg", "");// 清空错误信息rnrn String username = request.getParameter("username"); // 获取参数值rn String password = request.getParameter("password");rnrn String identfiy = request.getParameter("identfiy");// 获取参数传来的验证码rnrn String sessionIdentiy = (String) mySessionrn .getAttribute("Login_Image_Code"); // 获取session里的验证码rnrn String conformPswd = "";rn String sql = "select * from user where username='" + username + "'";rnrn if (identfiy == "" || identfiy.length() < 1) // 验证码为能为空rnrn mySession.setAttribute("errMsg", "验证码不能为空!");rn response.sendRedirect("/loginuser/login.jsp");rnrn else if (!identfiy.toUpperCase().equals(sessionIdentiy.toUpperCase())) // 验证验证码是是否一致rnrn mySession.setAttribute("errMsg", "验证码错误!");rn response.sendRedirect("/loginuser/login.jsp");rn rnrn ResultSet rs = null;rn mvconnection mvc = new mvconnection();rn if (mvc != null) rn rs = mvc.getResultSet(sql);rnrn else rn return;rn rn if (rs != null) rn try rn while (rs.next()) rn if (rs.getString(3) != null) rn conformPswd = rs.getString(3);rn rnrn rn catch (SQLException e) rn e.printStackTrace();rn finally rn rn rn else rn mySession.setAttribute("errMsg", "用户名不存在!");rn response.sendRedirect("/loginuser/login.jsp");rn rnrn if (password.equals(conformPswd)) rnrn if (username.equals("guest")) rn sql = "select * from user where enroll= 0";rn rs = mvc.getList(sql);rn mySession.setAttribute("rs", rs);rnrn response.sendRedirect("/loginuser/guest.jsp");rnrn else if (username.equals("admin")) rnrn sql = "select * from user where enroll= 1"; // 通过的rn rs = mvc.getList(sql);rn mySession.setAttribute("rs", rs);rn RequestDispatcher requestDispathcer = request.getRequestDispatcher("/admin.jsp");rn requestDispathcer.forward(request, response);rnrn else if (username.equals("user")) rnrn sql = "select * from user where enroll= 1"; // 通过的rn rs = mvc.getList(sql);rn // set attribute herern mySession.setAttribute("rs", rs);rn response.sendRedirect("/loginuser/user.jsp");rnrn rn else rn return;rn rnrn rn rn[/code]rnrn[code=Java]public ResultSet getList(String sql) rn ResultSet rs = null;rn Statement stmt = null;rn Connection con = null;rn con = this.dbC.getConnection();rn if (con != null) rn try rn stmt = con.createStatement();rn if (stmt != null) rn rs = stmt.executeQuery(sql);rn if (rs != null) rn return rs;rn else rn return null;rn rn else rn return null;rn rn catch (SQLException e) rnrn e.printStackTrace();rn return null;rn rnrn else rn return null;rn rnrn [/code]rnrnrn[code=HTML]rnrnrnrnrn rn rn rn adminrn rn rn rn rn rn rn rnrn rn rn rn rn id 用户名 简历信息 审核情况 是否录取 操作rn rn rn 修改 删除rn rn rn rnrn[/code]rnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: After end of result setrn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjavax.servlet.ServletException: After end of result setrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)rn org.apache.jsp.update_jsp._jspService(update_jsp.java:106)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.sql.SQLException: After end of result setrn com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)rn com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:709)rn com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2605)rn org.apache.jsp.update_jsp._jspService(update_jsp.java:73)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/5.5.25[color=#FF0000]我rs都没有关啊,怎么会有After end of result set错误[/color]
Operation not allowed after ResultSet closed异常
写了个递归方法,但是老报错,说rs已经关闭,但怎么查也查不出来,上网百度找了找,都不对,求大婶指点rn [code=java][/code]
hibernate连接mysql数据库,总是会在一段时间后显示No operations allowed after connection closed
这里是我的配置文件,到底哪里有<em>问题</em>呢?rnrnrnrnrnrnrnrn rn org.hibernate.dialect.MySQLDialectrn com.mysql.jdbc.Driverrn rn jdbc:mysql://127.0.0.1:3306/health_center?useUnicode=true&characterEncoding=utf8rn rn rootrn rn truern truern UTF-8rn truern rn org.hibernate.connection.C3P0ConnectionProviderrn 5rn 20rn 1800rn 900rn select 1rn 50rn rn truern rn rnrn
我做数据库边接池,为何会出现java.sql.SQLException: Operation not allowed after ResultSet closed
我的数据库是mysql 4.0.18,连接驱动是mysql-connector-java-3.0.11-stable,tomcat5.0.18rnrn当我用以下代码测试时,就会报错:rnrnrnrnrnrnrn
我的ResultSet 报Operation not allowed after ResultSet closed???
我用了两个resultset,并且分别用两个<em>statement</em>创建。怎么还报上面的那个错。
SQLException: Operation not allowed after ResultSet closed 如何避免?
stmt=conn.createStatement();rn rs=stmt.executeQuery(sql_b);rn rst=stmt.executeQuery(sql_a);rn rs.last();//当执行了 rst=stmt.executeQuery(sql_a);rs就会被关闭掉!rn int n=rs.getRow();rn rst.last();rn int m=rst.getRow();rnrn请问我该怎么做?才能避免被关闭掉。rn还有createStatement()里面有几个参数,那几个参数代表什么?谢谢各位
allowed to connect to this MySQL server" 的原因及解决办法">"Host 'localhost' is not allowed to connect to this MySQL server" 的原因及解决办法
"Host 'localhost' is not <em>allowed</em> to connect to this MySQL server" 的原因及解决办法
WAS : DSRA9110E: Statement is closed
在重复提交或多客户操作时老出现DSRA9110E: Statement is <em>closed</em>这个错误,大大们帮忙看下行不。谢谢了!rn下面是我调用的方法,入口为selRefForProNo,error是在执行select()方法是出现的:rnrnpublic class ReservationExecController extends ReservationBaseController rnrn public ReservationExecController(ActionMapping mapping,rn HttpServletRequest request, HttpServletResponse response,rn ConnectionManager connMgr, ActionMessageManager messageMgr) rn super(mapping, request, response, connMgr, messageMgr);rn // TODO 自动生成的构造函数存根rn rn rn public List selReservationNodepad(ReservationNodepad reservationNodepad)throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn return reservationExecManager.select(reservationNodepad);rn rn rn public List selGenericCode(GenericCode genericCode)throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn return reservationExecManager.select(genericCode);rn rn rn public List selReservationSchedule(ReservationSchedule reservationSchedule) throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn reservationSchedule.setActiveIdx(ReservationParameter.ACTIVEIDX_Y);rn return reservationExecManager.select(reservationSchedule);rn rn rn public List selProposal(Proposal proposal) throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn return reservationExecManager.select(proposal);rn rn rn public List selReservationTransaction(ReservationTransaction reservationTransaction) throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn return reservationExecManager.select(reservationTransaction);rn rn rn public List selReservationStatus(ReservationStatus reservationStatus) throws Exceptionrn ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);rn return reservationExecManager.select(reservationStatus);rn rn rn public boolean [color=#FF0000]selRefForProNo[/color](ReservationExecForm reservationExecForm) throws Exceptionrn boolean bool = true;rn List proList = selProposal(reservationExecForm.getProposal());rn bool = isValiProNo(proList);rn bool = bool && ReservationParameter.LOAN_STATUS_SIGN.equals(proList.get(0).getStatus());rn if(bool)rn reservationExecForm.setProposal(proList.get(0));rn selReservationExecForm(reservationExecForm);rn ReservationLocking reservationLocking = new ReservationLocking();rn reservationLocking.setProposalNo(reservationExecForm.getProposal().getProposalNo());rn List rlList = selReservationLock(reservationLocking);rn if(rlList.size() > 0 && !request.getSession().getAttribute("username").toString().equals(rlList.get(0).getCreateBy()))rn reservationExecForm.setIsLock(true);rn reservationExecForm.setReservationLocking(rlList.get(0));rn elsern bool = bool && addReservationLocking(reservationLocking) == 1 ? true : false;rn reservationExecForm.setIsLock(false);rn reservationExecForm.setReservationLocking(reservationLocking);rn rn getReservationExecList(reservationExecForm);rn rn return bool;rn rn rn public boolean selReservationExecForm(ReservationExecForm reservationExecForm) throws Exceptionrn boolean bool = true;rn ReservationNodepad reservationNodepad = new ReservationNodepad();rn reservationNodepad.setProposalNo(reservationExecForm.getProposal().getProposalNo());rn Util.clearList(reservationExecForm.getRnList()).addAll(selReservationNodepad(reservationNodepad));rn for (ReservationNodepad rn : reservationExecForm.getRnList()) rn if(rn.getCreatedDate() != null)rn rn.getRnd().setCreatedDate(Util.DateStringConverter(rn.getCreatedDate(), ReservationParameter.DATE_FORMAT_ITEM));rn rn if(rn.getLastUpdatedDate() != null)rn rn.getRnd().setLastUpdatedDate(Util.DateStringConverter(rn.getLastUpdatedDate(), ReservationParameter.DATE_FORMAT_ITEM));rn rn rn ReservationSchedule reservationSchedule = new ReservationSchedule();rn reservationSchedule.setBranchCode(reservationExecForm.getProposal().getBranchCode());rn Util.clearList(reservationExecForm.getRsList()).addAll(selReservationSchedule(reservationSchedule));rn GenericCode genericCode = new GenericCode();rn genericCode.setCategory(ReservationParameter.CATEGORY);rn List gcList = selGenericCode(genericCode);rn for (GenericCode gc : gcList) rn if(gc.getGroupCode() == null || "".equals(gc.getGroupCode()))rn reservationExecForm.getGcParentList().add(gc);rn elsern reservationExecForm.getGcChildList().add(gc);rn rn rn reservationExecForm.getReservationStatus().setActiveIdx(ReservationParameter.ACTIVEIDX_Y);rn reservationExecForm.getReservationStatus().setProposalNo(reservationExecForm.getProposal().getProposalNo());rn List rsList = selReservationStatus(reservationExecForm.getReservationStatus());rn reservationExecForm.setReservationStatus(rsList.size() == 1 ? rsList.get(0) : null);rn reservationExecForm.getReservationTransaction().setActiveIdx(ReservationParameter.ACTIVEIDX_Y);rn reservationExecForm.getReservationTransaction().setProposalNo(reservationExecForm.getProposal().getProposalNo());rn List rtList = selReservationTransaction(reservationExecForm.getReservationTransaction());rn reservationExecForm.setReservationTransaction(rtList.size() == 1 ? rtList.get(0) : null);rn if(rtList.size() > 0)rn Date reserveDate = reservationExecForm.getReservationTransaction().getReserveDate();rn reservationExecForm.setReserveDate(reserveDate == null ? null : Util.DateStringConverter(reserveDate, ReservationParameter.DATE_FORMAT_NOITEM));rn elsern reservationExecForm.setReserveDate(null);rn rn Collections.sort(reservationExecForm.getRsList());rn return bool;rn rn
Write operations are not allowed in read-only mod......
今天在做spring2.x+struts2.0+hibernate3.x的项目时候,在执行更新操作的时候,出现的<em>问题</em>,大家帮助给看一下:rnrnorg.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rn at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1095)rn at org.springframework.orm.hibernate3.HibernateTemplate$14.doInHibernate(HibernateTemplate.java:656)rn at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)rn at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:654)rn at org.springframework.orm.hibernate3.HibernateTemplate.update(HibernateTemplate.java:650)rn at com.dacc.dcp.dao.impl.DPourRecordDAO.saveOrUpdateDPourRecord(DPourRecordDAO.java:61)rn at com.dacc.pp.service.impl.DHeatRecordService.saveOrUpdateDPourRecord(DHeatRecordService.java:29)rn at com.dacc.pp.action.Pouring_updateWheelAction.updateWheelInfo(Pouring_updateWheelAction.java:52)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn rn----------------------------------------------------------------------------------------rnweb.xmlrnrn rn contextConfigLocation rn /WEB-INF/classes/bean.xml rn rn rn rn org.springframework.web.context.ContextLoaderListener rn rn rn rn lazyLoadingFilter rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter rn rn singleSessionrn truern rn rn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn lazyLoadingFilterrn *.actionrn rn rn struts2rn /*rn rn rn index.jsprn rnrnrnrn----------------------------------------------------------------------------------------rnspring 配置文件rnrnrn rn rn rn rn rn rn rn rn rn rn rn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn rn rn rn rn rn rn rn rn DHeatRecordServiceImplrn DPourRecordServiceImplrn rn rn rn rn rn rn transactionInterceptorrn rn rn rn rn rn rn ......rnrn---------------------------------------------------------------------------------rnDao 层rnrn public int saveOrUpdateDPourRecord(DPourRecord vo)rn log.debug("save or update object");rn rn DPourRecord bean = findDPourRecordByWheelCode(vo.getWheelCode());rn System.out.println(bean.getPourId());rn bean.setWheelCode(vo.getWheelCode());rn bean.setCopeNo(vo.getCopeNo());rn bean.setCopeScrap(vo.getCopeScrap());rn bean.setTestCode(vo.getTestCode());rn bean.setDragScrap(vo.getDragScrap());rn bean.setSpecialUltra(vo.getSpecialUltra());rn bean.setStates(vo.getStates());rn rn try rn getHibernateTemplate().update(bean);rn getHibernateTemplate().flush();rnrn catch (RuntimeException e) rn log.error("save or update object failed!");rn e.printStackTrace();rnrn rn rn return 0;rn rnrnrn------rnrn//通过车轮号查找对象rn public DPourRecord findDPourRecordByWheelCode(String wheelCode)rn log.debug("find id by wheelCode!");rn List paramsList = new ArrayList();rn List objectList = new ArrayList();rn paramsList.add(wheelCode);rn System.out.println(wheelCode);rn String strSql = "From DPourRecord where wheel_code =?";rn DPourRecord dpr;rn try rn dpr =(DPourRecord) getHibernateTemplate().find(strSql, paramsList.toArray()).get(0);rn rn catch (RuntimeException e) rn log.error("find id by wheel_code is failed!");rn throw e;rn rn return dpr;rn rnrn---------------------rn请大家帮助给看一下,项目着急在用!,在网上查的说去掉spring 配置文件不必要的readyOnly ,还有说修改web.xml 文件,我照做,还是没解决<em>问题</em>
java.sql.SQLException: Closed Connection
本机上运行一个程序,用的是java1.5, oracle9,正常!rn将程序移植到unix服务器上之后,执行了几次查询数据库的操作之后,就报错为:“java.sql.SQLException: Closed Connection ”。rn我的DB连接方式是程序开始就连上,到程序结束时才断开的。rnWhy?? 请高手指点!!!
java.sql.SQLException: Already closed
tomcate6,大概启动后运行半小时就报错,而且整个程序无法访问rnCaused by: java.sql.SQLException: Already <em>closed</em>.rn at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)rn at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.closeConnection(LocalDataSourceConnectionProvider.java:96)rn at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)rn
closed"错误??">"java.sql.SQLException: ResultSet is closed"错误??
rn rnrn总是说rs2已经关闭了???? rn谢谢rn
The system Message Box that is closed atuomatically after so
The system Message Box that is <em>closed</em> atuomatically <em>after</em> some time(21KB)
java.sql.SQLException: ResultSet is closed 什么意思啊?
在程序中,用完一个result后,先关闭它。想用的时候我想再开一个:ResultSet result1=stm.executeQuery("select id1 from forum where previous=\'"+topic_id+"\'");。rn可是却出现如下提示:java.sql.SQLException: ResultSet is <em>closed</em> rn请教各位?
错误原因:java.sql.SQLException:Already closed
开了一个定时,在连接数据库层执行Sql的时候,后台jboss报错rnjava.sql.SQLException:Already <em>closed</em>rn请问原因!rnrn我不发布的,单独测试的时候,代码从头到尾都没有错误
使用Spring引起的错误
使用Spring提供的Open Session In View而引起Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER) 错误解决
高手帮忙!Write operations are not allowed in read-
WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,203 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,218 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,218 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,218 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.<em>after</em>PropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,718 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,718 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setSessionFactory(org.hibernate.SessionFactory)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,718 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,734 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rn2008-04-02 13:00:09,734 WARN [org.springframework.aop.framework.Cglib2AopProxy] - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.<em>after</em>PropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.rnrn WARN [org.apache.struts.chain.commands.AbstractExceptionHandler] - Unhandled exceptionrnorg.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rn at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1095)rn at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:634)rn我的配置文件是这样的rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn com/baoxiu/po/Baoxiulist.hbm.xmlrn com/baoxiu/po/User.hbm.xmlrn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn truern truern rn rn rnrnrnrnrn rn rn rn rn rn rnrnrn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rnrn rnrn rnrn rnrn rn rn rn rn rn rn rn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrnrn rn rnrn rn rnrn rnrn rn rn rn rn rn rn rn PROPAGATION_REQUIREDrn PROPAGATION_REQUIRED,readOnlyrn rn rnrn rnrnrnrnrn rnrnrnrn rn rn rn rn rn rn rn rn rn rnrnrnrnrn
Statement Tracer for Oracle,oracle代码跟踪工具
用于跟踪使用oracle期间产生的代码
java.sql.SQLException: After end of result set
我已经声明两个Statment了啊,为什么ResultSet结果集还是关闭了?代码如下rn PreparedStatement pstmt =conn.prepareStatement(sql);rn Statement stmt=conn.createStatement();rn Statement stmt2=conn.createStatement();rn ResultSet rssumkm1=stmt.executeQuery(sql1); rn ResultSet rs=pstmt.executeQuery();rn rn ResultSet rs2=stmt2.executeQuery(sql2); rn rs2.last();rn while(rs.next())rn rn Jixiao jx=new Jixiao();rn rn jx.setId(rs.getInt(1));rn jx.setDay(rs.getString(2));rn jx.setClasst(rs.getString(3));rn jx.setStarttingtime(rs.getInt(4));rn jx.setFinishtime(rs.getInt(5));rn jx.setOrigin(rs.getString(6));rn jx.setFinish(rs.getString(7));rn jx.setStartkm(rs.getInt(8));rn jx.setFinishkm(rs.getInt(9));rn jx.setKm(rs.getInt(10));rn jx.setAllowance(rs.getInt(11));rn list.add(jx);rn rn rn rssumkm1.next();rn request.setAttribute("sumkm", (rssumkm1.getString(1))); rn System.out.println((rssumkm1.getString(1)));rn rs.last();rn rs2.next();rn request.setAttribute("sumAllowance", (rs2.getString(1)));rn request.setAttribute("list", list);rn request.getRequestDispatcher("Showlist.jsp").forward(request, response);rnrnrn报错的代码是这句 request.setAttribute("sumAllowance", (rs2.getString(1))); 这句代码以上都执行了。
错误:Write operations are not allowed in read-only mode求教
执行saveOrUpdate方法:rnrn[code=Java]getHibernateTemplate().saveOrUpdate(instance);[/code]rnrn错误信息:rnexception rnrnjavax.servlet.ServletException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rnrnroot cause rnrnorg.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rnrnrn请问怎么回事呢?
Write operations are not allowed in read-only mode (FlushMode.MANUAL)
[img=http://img.bbs.csdn.net/upload/201507/05/1436102799_783564.jpg][/img]rn[img=http://img.bbs.csdn.net/upload/201507/05/1436102844_730247.jpg][/img]rn[img=http://img.bbs.csdn.net/upload/201507/05/1436102886_267059.jpg][/img]rn保存的时候报错,大虾帮我看看,拜谢
Android WebView 报 Not allowed to load local resource错误的解决办法
Android WebView 报 Not <em>allowed</em> to load local resource错误的解决办法 博客地址:http://blog.csdn.net/yuzhiqiang_1993/article/details/76228541
closed~~~closed~~~closed
<em>closed</em> <em>closed</em>~~~<em>closed</em>~~~<em>closed</em> <em>closed</em>~~~<em>closed</em>~~~<em>closed</em>
大家帮忙看看这个是哪里的问题?operation not allowed after resultset closed
我都已经正常关闭ResultSet了啊?可是数据库中共有10条信息,发布后只是显示5条,然后就会报operation not <em>allowed</em> <em>after</em> resultset <em>closed</em>的错误,说我操作前把结果集关闭了。我知道一个Statement和一个ResultSet对应出现,但是我都有改不了。具体<em>问题</em>代码如下:rnrnrn我调了很久 也不明白是啥意思~~请大家帮忙看看啊~
总是提示:Operation is not allowed when the object is closed
原语句:rnrn总是提示:Operation is not <em>allowed</em> when the object is <em>closed</em>rn怎么解决?
解决Exception java.sql.SQLException ORA-00600 内部错误代码
在oracle里面运行一下,解决Exception java.sql.SQLException ORA-00600 内部错误代码
error: Link tests are not allowed after GCC_NO_EXECUTABLES
我在建立arm交叉编译环境遇到这个<em>问题</em>,在谷歌上查找有很多遇到这个<em>问题</em>的,但是没有一个是合适的解决方案,各位大神帮帮忙解决一下rnchecking whether the /home/embedded/build-bools/build-gcc/./gcc/xgcc -B/home/embedded/build-bools/build-gcc/./gcc/ -B/home/embedded/tools/arm-linux/bin/ -B/home/embedded/tools/arm-linux/lib/ -isystem /home/embedded/tools/arm-linux/include -isystem /home/embedded/tools/arm-linux/sys-include linker (/home/embedded/build-bools/build-gcc/./gcc/collect-ld) supports shared libraries... yesrnchecking whether -lc should be explicitly linked in... nornchecking dynamic linker characteristics... configure: error: Link tests are not <em>allowed</em> <em>after</em> GCC_NO_EXECUTABLES.rnmake[1]: *** [configure-target-libstdc++-v3] Error 1rnmake[1]: Leaving directory `/home/embedded/build-bools/build-gcc'rnmake: *** [all] Error 2rn
Statement Tracer for Oracle
Statement_Tracer_for_Oracle是一款非常好用的oracle跟踪工具 目前网上基本都是英文原版的
statement和prepared区别
jdbc中<em>statement</em>和prepared区别,jdbc中<em>statement</em>和prepared区别
02 - Financial Statements, Cash Flow, and Taxes
02 - Financial Statements, Cash Flow, and Taxes
When a Statement object is closed,the reusltset will be closes???
When a Statement object is <em>closed</em>,the reusltset will be closes??rn如果上面的是真的。在jsp中,如果我要返回resultset,那不是不可能吗?但是我确实是返回过resultset,并且Statement也在resultset返回之前已经关闭了。
Introduction to Operations Research 第10版
Introduction to Operations Research 第10版 Frederick S. Hillier Gerald J. Lieberman 2015年出版
You can't operate on a closed Statement!!!
private static final String QUERY_PROCESS ="select * from t_wf_process where uuid =?"; rn @Overridern public ProcessEntity getProcessEntity(String processUUID)throws SQLException rn ProcessEntity processEntity = null;rn try rn connection = this.commonJDBC.getConnection();rn ps = connection.prepareStatement(QUERY_PROCESS);rn ps.setString(1, processUUID);rn rs = ps.executeQuery();rn if (rs.next()) rn processEntity = WFEngineConstant.fillProcessEntity(rs);rn else rn processEntity = null;rn rn catch (SQLException e) rn logger.info("getProcessEntity出现异常", e);rn finally rn this.commonJDBC.cleanUp(connection, ps, rs); // 释放资源rn rn // 返回流程实例对象rn return processEntity;rn rn//获取连接*************rn /**rn * 获取Connectionrn */rn public Connection getConnection()rn Connection connection = this.template.getConnection();rn try rn if (connection.isClosed()) rn connection = SqlSessionUtils.getSqlSession(rn this.template.getSqlSessionFactory(),rn this.template.getExecutorType(),rn this.template.getPersistenceExceptionTranslator())rn .getConnection();rn rn catch (Exception e) rn e.printStackTrace();rn rn return connection; rn rnrn//关闭********rnrn/**rn * 关闭Connection,PreparedStatement,ResultSetrn */rn public void cleanUp(Connection c,PreparedStatement ps,ResultSet rs)rn this.closeResultSet(rs);rn this.closePreparedStatement(ps);rn this.closeConnection(c);rn rn rn /**rn * 关闭Connectionrn */rn public void closeConnection(Connection c)rn try rn if (c != null) rn c.close();rn rn catch (Exception e) rn e.printStackTrace();rn rn rn rn /**rn * 关闭PreparedStatementrn */rn public void closePreparedStatement(PreparedStatement ps)rn try rn if (ps != null) rn ps.close();rn rn catch (Exception e) rn e.printStackTrace();rn rn rn rn /**rn * 关闭ResultSetrn */rn public void closeResultSet(ResultSet rs)rn try rn if (rs != null) rn rs.close();rn rn catch (Exception e) rn e.printStackTrace();rn rn rn使用的是c3p0 注入template 模板得到连接的rn有时候抛出如下的错。。。但是有时候又没有这样的错。。。是什么原因。。rnrn抛出getProcessEntity出现异常!rnYou can't operate on a <em>closed</em> Statement!!!rn
VMware vRealize Operations
VMware vRealize Operations: Install, Configure, Manage
Linux和 Windows的vRealize Operations Manager安装和配置
使用于Linux和 Windows的vRealize Operations Manager安装和配置。
hibernate配置c3po连接池后:无法使用jdbc查询?报错Operation not allowed after ResultSet closed
代码段:rnrn[code=Java]PreparedStatement st = null;rn Session session = getSession();rn ResultSet rs = null;rn String sql = "select id,user_id,content,isaviable,createtime,business_info_id,overallimpression,discuss_sub_count,collection_count,read_status,forward_count from business_discusses a,( select max(id) as ids from business_discusses where isaviable = true group by business_info_id) b where a.id = b.ids order by createtime desc LIMIT 0,10";rn List list = new ArrayList();rn try rn// Transaction t = session.beginTransaction();rn st = session.connection().prepareStatement(sql);rn rs = st.executeQuery();rn// t.commit();rn UsersDAO userDao = new UsersDAO();rn rn BusinessInfoesDAO infoDao = new BusinessInfoesDAO();rn while (rs.next()) rn BusinessDiscusses dis = new BusinessDiscusses();rn dis.setId(rs.getInt("id"));rn dis.setUsers(userDao.findById(rs.getInt("user_id")));rn dis.setBusinessInfoes(infoDao.findById(rs.getInt("business_info_id")));rn dis.setContent(rs.getString("content"));rn dis.setIsaviable(rs.getBoolean("isaviable"));rn dis.setCreatetime(rs.getTimestamp("createtime"));rn dis.setOverallimpression(rs.getInt("overallimpression"));rn dis.setDiscussSubCount(rs.getInt("discuss_sub_count"));rn dis.setCollectionCount(rs.getInt("collection_count"));rn dis.setReadStatus(rs.getBoolean("read_status"));rn dis.setForwardCount(rs.getInt("forward_count"));rn list.add(dis);rn rn return list;rnrn catch (Exception e) rn e.printStackTrace();rn return null;rn finally rn try rn if (rs != null) rnrn rs.close();rn rn if (st != null) rn st.close();rn rn catch (SQLException e) rn e.printStackTrace();rn rn [/code]rnrnrnrn
用了DS,总是发生这种错误Operation not allowed after ResultSet closed
用了DS,总是发生这种错误rn Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em>rnrnrn
java.sql.SQLException: Io 异常: Socket closed怎样解决
我的运行环境是tomcat5.5+oracle10.2+linux 后台报错是rn“rnjava.sql.SQLException: Io 异常: Socket <em>closed</em>rnERROR - errorjava.lang.NullPointerExceptionrn”rn导致出现取出的数据为空值,请问怎么解决这个<em>问题</em>?非常急!rn
java.sql.SQLException: Io exception: Socket closed 問題
通過監測,程式與數據庫的連接已經丟失,但它不出現 collection <em>closed</em> 的錯誤,卻出現java.sql.SQLException: Io exception: Socket <em>closed</em> 的錯誤,不理解!!!!rn 請問一般會在甚麼情況下會出現這種錯誤,由於甚麼引起的,請高手指點.rnrn
求助:java.sql.SQLException: Already closed总是自动关闭(奇怪)
我打开jsp页面后,出现以下代码,重启tomcat就可以正常,不知道什么原因。用的是mysql数据库。请高手明示。rnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: javax.servlet.ServletException: java.sql.SQLException: Already <em>closed</em>.rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjavax.servlet.ServletException: java.sql.SQLException: Already <em>closed</em>.rn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)rn org.apache.jsp.admin.dealwithcenter_jsp._jspService(dealwithcenter_jsp.java:761)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.sql.SQLException: Already <em>closed</em>.rn org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)rn org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)rn cwcNews.dbConn.CloseConn(dbConn.java:54)rn cwcNews.admin.checkLogin(admin.java:97)rn org.apache.jsp.admin.dealwithcenter_jsp._jspService(dealwithcenter_jsp.java:342)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/6.0.14
statement-tracer-for-oracle
<em>statement</em>-tracer-for-oracle 跟踪器
Optimization in Operations Research(第二版)
Developing skills and intuitions through accessible optimization models and analysis. The Second Edition covers the full scope of optimization (mathematical programming), spanning linear, integer, nonlinear, network, and dynamic programming models and algorithms, in both single and multiobjective contexts
java.sql.SQLException: Connection handle has been closed and is unusable
015-03-24 10:50:38,000 INFO [STDOUT] Warning: The encoding 'GBK' is not supported by the Java runtime.rn2015-03-24 10:50:42,578 INFO [STDOUT] 0 getWorkItemTodoCountrn2015-03-24 10:50:42,703 ERROR [java.sql.Connection] Error calling Connection.prepareStatement:rnjava.sql.SQLException: Connection handle has been <em>closed</em> and is unusablern at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:537)rn at org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:524)rn at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:184)rn at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:168)rn at $Proxy62.prepareStatement(Unknown Source)rn at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53)rn at $Proxy63.prepareStatement(Unknown Source)rn at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:172)rn at com.ibatis.sqlmap.engine.mapping.<em>statement</em>.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)rn at com.ibatis.sqlmap.engine.mapping.<em>statement</em>.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)rn at com.ibatis.sqlmap.engine.mapping.<em>statement</em>.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)rn at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:565)rn at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:540)rn at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)rn at org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(SqlMapClientTemplate.java:243)rn at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:193)rn at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:241)rn at com.smartdot.nebula.docquery.dao.DocQueryDao.queryAllDocTodoCount(DocQueryDao.java:315)rn at com.smartdot.nebula.docquery.bo.DocQueryBO.queryTodoAllTypeDocCount(DocQueryBO.java:323)rn at com.smartdot.nebula.docquery.action.DocQueryAction.queryTodoAllTypeDocList(DocQueryAction.java:822)rn at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)rn at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)rn at org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)rn at com.smartdot.galaxy.portal.action.MappingDispatchBaseAction.execute(Unknown Source)rn at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.galaxy.portal.filter.IncludeAccountFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.galaxy.portal.filter.log.ActionLogFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.galaxy.portal.filter.auth.URLProtectionFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.galaxy.portal.filter.auth.AuthFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.galaxy.portal.filter.ShareLdapConnectionFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at com.smartdot.util.server.SetCharacterEncodingFilter.doFilter(Unknown Source)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)rn at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)rn at java.lang.Thread.run(Thread.java:595)rn2015-03-24 10:50:42,703 WARN [org.apache.struts.action.RequestProcessor] Unhandled Exception thrown: class org.springframework.jdbc.UncategorizedSQLExceptionrn2015-03-24 10:50:42,703 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sipo].[action]] Servlet.service() for servlet action threw exceptionrncom.ibatis.common.jdbc.exception.NestedSQLException: rn--- The error occurred in ibatis/DocQueryMapping.xml. rn--- The error occurred while executing query. rn--- Check the select count(*) from( select distinct d.*,pp.object_id as flowid,pp.label as flowtemplate,p.object_id as activityid, p.displayName as activityname,p.start_date as activitystart from (select sendid as id , doctype,title,startdept, startdate,startuser,kind,docstatus,notuse, emergency,secret,subject,docmark from goa_senddoc union select recvid as id,doctype,title,comegodept as startdept, null as startdate ,null as startuser, kind,docstatus,notuse, emergency,secret,subject,docmark from goa_recvdoc )d left outer join GOA_BUSINESS_FLOW_ASSOCIATE gbfa on (d.id=gbfa.BUSINESSID and gbfa.BUSINESSTYPE=d.doctype ) left outer join process pp on (pp.OBJECT_ID=gbfa.FLOWID) left outer join process p on (p.superprocess = pp.object_id) left outer join processace ace on(ace.object_id = p.object_id) where ( ( ( ace.profile_name = lower(?) and ace.profile_type = 3) ) and (p.state = 2 or p.state=6) and pp.is_definition = 0 and pp.state=2 and pp.superprocess is null ) and notuse=0  ) . rn--- Check the SQL Statement (preparation failed). rn--- Cause: java.sql.SQLException: Connection handle has been <em>closed</em> and is unusablernrn请问这是什么原因引起的,用的是ibatis连接数据库
Operations Research applications and algorithms(高清版)
Operations Research: Applications and Algorithms 4th Publisher: Duxbury Press; 4 edition (July 25, 2003) Language: English Operations_research_4th_Wayne_L_Winston_Jeffrey_B_Goldberg
production and operations analysis. 7th ed.
Introduction xvii 1 Strategy and Competition 1 2 Forecasting 52 3 Sales and Operations Planning 128 Supplement 1 Linear Programming 169 4 Inventory Control Subject to Known Demand 198 5 Inventory Control Subject to Uncertain Demand 249 6 Supply Chain Management 315 7 Service Operations Management 367 Supplement 2 Queueing Techniques 417 8 Push and Pull Production Control Systems: MRP and JIT 437 9 Operations Scheduling 490 10 Project Scheduling 543 11 Facilities Layout and Location 593 12 Quality and Assurance 666 13 Reliability and Maintainability 742
Introduction to Operations Research (10th Edition Frederick K. Hiller)
PDF格式。 Professor emeritus of <em>operations</em> research at Stanford University. Dr. Hillier is especially known for his classic, award-winning text, Introduction to Operations Research, co-authored with the late Gerald J. Lieberman 弗雷德里克·S.希利尔(Fredexick S.Hillier)在美国华盛顿州的Aberdeen诞生和成长,他曾在全州高中的作文写作、数学、辩论和音乐比赛中获奖。作为斯坦福大学的本科生,他在超过3O0名学生的工程班级中名列第一。他因技术写作获McKinsey奖,在斯坦福woodwind Q1Jintet的表现获杰出的二年级大学生辩论奖,因在工程和人文社会科学结合上的优异成绩获Hamilton奖。当他毕业并获工业工程理学士时,获得了三项奖学金(国家科学基金、陶·贝塔·派、丹福斯)用于在斯坦福大学运筹学专业的研究生学习。获博士学位后,他留斯坦福大学任教,并同时获得康奈尔大学、卡内基·梅隆大学、丹麦技术大学、新西兰坎特布里大学、英国剑桥大学的访问邀请。在斯坦福大学任教35年后,他于1996年提前退休以便集中精力从事专著的写作,现为斯坦福大学运筹学的名誉教授。
急!!!一个jsp错误java.sql.SQLException ResultSet is closed
这是部分代码.用javabean连接数据库,数据库是access.分别插入了两个数据库表 rntomcat 5.0+jdk1.4.2rn错误:java.sql.SQLException ResultSet is <em>closed</em>rnString title=new String(request.getParameter("title").getBytes("ISO-8859-1")); rnString sql1="select * from tbcrlist where title=´"+title+"´"; rnResultSet rs1=db.executeQuery(sql1); rnif(rs1.next())%> rn 返回 rn rn
Java.sql.SQLException: After end of result set错误
大家帮我看一下,下面这段代码到底错在哪里啊?老是提示标题上的错误,我都快郁闷死了!rnrn public String update() throws Exceptionrn String sql="select boardid,boardtype from board";rn DBConnect dbc1=new DBConnect(sql);rn ResultSet rs=dbc1.executeQuery();rn StringBuffer sb=new StringBuffer();rn if(!rs.next())rn dbc1.close();rn throw new Exception("论坛还没有版面,请先添加版面。");rn rn // temprs;rn DBConnect dbc=new DBConnect();rn String newuser=newuser(dbc);rn dorn rn sql="Select count(announceid) from bbs1 where boardid="+rs.getInt(1);rn ResultSet temprs=dbc.executeQuery(sql);rn rn temprs.next();rn String tempString=temprs.getString(1);rn int allArticle=(tempString==null)?0:temprs.getInt(1);rn rn temprs=dbc.executeQuery("Select count(announceid) from bbs1 where boardid="+rs.getInt(1) +" and parentID=0");rn temprs.next();rn tempString=temprs.getString(1);rn int allTopic=(tempString==null)?0:temprs.getInt(1);rnrn ResultSet ers=dbc.executeQuery("select Max(announceid) from bbs1 where boardid="+rs.getInt(1));rn ers.next();rn tempString=ers.getString(1);rn rn //int maxID=(tempString==null)?"无":ers.getInt(1);rn String userName,dateandtime;rnrn rn if(tempString==null)rn userName="无";rn dateandtime=Format.getDateTime();rn rn else rn int maxID=ers.getInt(1);rn ers=dbc.executeQuery("select username,dateandtime from bbs1 where announceid="+maxID);rn ers.next();rn userName=ers.getString(1);rn dateandtime=ers.getString(2);rn rnrn sql="update board set lastpostuser=?,lastposttime='"+dateandtime+"',lastbbsnum="+allArticle+",lasttopicnum="+allTopic+",TodayNum="+todays(rs.getInt(1),dbc)+" where boardid="+rs.getInt(1);rn dbc.prepareStatement(sql);rn dbc.setBytes(1,userName.getBytes("GBK"));rn dbc.executeUpdate();rn sb.append("更新论坛数据成功,"+rs.getString(2)+"共有"+allArticle+"篇贴子,"+allTopic+"篇主题,今日有"+todays(rs.getInt(1),dbc)+"篇帖子。 ");rn rn while(rs.next());rn sql="update config set TopicNum="+titlenum(dbc)+",BbsNum="+gettipnum(dbc)+",TodayNum="+alltodays(dbc)+",UserNum="+allusers(dbc)+",lastUser=?";rn dbc.prepareStatement(sql);rn dbc.setBytes(1,newuser.getBytes("GBK"));rn dbc.executeUpdate();rn dbc.close();rn dbc1.close();rn ForumPropertiesManager.resetManager();rn return sb.toString();rnrn
Statement Tracer for ADO
Statement Tracer for ADO 绿色版,捕捉ADO SQL代码.
Operation not allowed after ResultSet closed 如何在一个action中执行多条sql语句
我想在一个action中从两个表中查询数据 写了 两个sql语句 执行的时候 报错 求改代码rnrnpackage ac;rnrnimport com.opensymphony.xwork2.ActionSupport;rnimport java.sql.*;rnimport java.util.ArrayList;rnimport java.util.List;rnimport java.util.Map;rnimport com.opensymphony.xwork2.ActionContext;rnimport com.opensymphony.xwork2.ActionSupport;rnrnimport shiti.JxinXin;rnrnpublic class SplAction extends ActionSupport rn private String name;rn private String caption;rn private String content;rn public List list;rn public List infolist=new ArrayList();rn rn rn rn public List getList() rn return list;rn rnrn public void setList(List list) rn this.list = list;rn rnrn public String getName() rn return name;rn rnrn public void setName(String name) rn this.name = name;rn rnrn public String getCaption() rn return caption;rn rnrn public void setCaption(String caption) rn this.caption = caption;rn rnrn public String getContent() rn return content;rn rnrn public void setContent(String content) rn this.content = content;rn rnrn public String execute() throws Exceptionrn ActionContext actionContext = ActionContext.getContext();rn Map session = actionContext.getSession();rn String url = "jdbc:mysql://localhost:3306/";rn String dbName = "xinxiangfal";rn String driverName = "com.mysql.jdbc.Driver";rn String userName = "root";rn String passWord = "123";rnrn Connection con = null;rn Statement stmt = null;rn ResultSet rs = null;rn ResultSet rst = null;rn try rn Class.forName(driverName).newInstance();rn con = DriverManager.getConnection(url + dbName, userName, passWord);rn stmt = con.createStatement();rnrn catch (Exception e) rn System.out.println(e.getMessage());rn rn[color=#000000] String sql = "select * from jshipin where caption='" + this.name + "'";rn String sqlt="select * from sinfor where jid=(select jid from jshipin where caption='"+this.name+"');";rn rs = stmt.executeQuery(sql);rn rn rn rn while(rs.next())rn caption=rs.getString("caption");rn content=rs.getString("content");rn session.put("TZ", this.name);rn rn rnrn rn rst= stmt.executeQuery(sqlt);rn rs.last();rn rn while(rst.next())rn rn JxinXin jx=new JxinXin();rn jx.setSid(rst.getInt("sid"));rn jx.setFileName(rst.getString("fileName"));rn jx.setTime(rst.getString("time"));rn rn this.setList(infolist);rn rn rn return SUCCESS;[/color][color=#FF0000][/color]rn rn rnrnrn提示的错误是 Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em> 该如何执行啊 谢谢大家
大家帮忙看看我这个错误吧~新手 请多多指教 谢谢 Operation not allowed after ResultSet closed
下面是数据库操作的JavaBeanrnpackage jkxt;rnimport java.sql.*;rnrnpublic class SQLbeanrnrnprivate Connection con = null;rnprivate Statement sta = null;rnprivate Statement usta = null;rnprivate PreparedStatement psta = null;rnprivate ResultSet rs = null;rnrnrnpublic SQLbean()rn tryrn Class.forName("com.mysql.jdbc.Driver");rn con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/xiangmushuju","root","123456");rn rn catch(Exception e)rn System.err.println(e.getMessage());rn rn rnrnpublic ResultSet query(String sqls)rn tryrn sta =con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);rn rs = sta.executeQuery(sqls); rn rn catch(Exception e)rn System.out.println(e.toString());rn rn return rs;rn rnrnrnpublic PreparedStatement presta(String sqls)rn tryrn psta=con.prepareStatement(sqls);rn rn catch(Exception e)rn System.out.println(e.toString());rn rn return psta;rn rnrnpublic void update(String sqls)rn tryrn usta =con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);rn usta.executeUpdate(sqls);rn rn catch(Exception e)rn System.out.println(e.toString());rn rn rn rnpublic void RSclose(ResultSet rs)rn tryrn rs.close();rn sta.close();rn rn catch(Exception e)rn System.out.println(e.toString());rn rnrnrnpublic void UPclose()rn tryrn usta.close();rn rn catch(Exception e)rn System.out.println(e.toString());rn rn rnrnrn下面是报错的页面rn30*1000)rn rn PreparedStatement stm=sql.presta("select * from alarm where id=? ");rn stm.setInt(1,id) ;rn ResultSet rss=stm.executeQuery();rn while(rss.next())rn rn if(rss.getInt("td")==1)rn rn sqls="update alarm set break_td='1' where id='"+id+"'";rn sql.update(sqls);rn sql.UPclose();rn flag++;rn if(rss.getInt("break_h")==0)rn Date aDate =new Date(lDate); rn DateFormat dateFormatterChina = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);//格式化输出rn TimeZone timeZoneChina = TimeZone.getTimeZone("Asia/Shanghai");//获取时区rn dateFormatterChina.setTimeZone(timeZoneChina);//设置系统时区rn String nowtime=dateFormatterChina.format(aDate);rn sqls="update alarm set break_h='1' where id='"+id+"'";rn sql.update(sqls);rn sql.UPclose();rn rn rn rn rss.close();rn stm.close();rnrn rn elsern rn sqls="update alarm set break_td='0',break_h='0' where id='"+id+"'";rn sql.update(sqls);rn sql.UPclose();rn rn rn rn sql.RSclose(rs);rn rn out.println(flag);rnrn%> rnrn这个项目是从客户端向服务器发送数据包,服务器接受数据之后存储到数据库里,然后再用JS不停调用上面的jsp页面做一个简单的处理,没有数据包来的时候不会报错(上面的页面也是在不断的执行),如果同时来大量数据包的时候就会报题目中的错误,但是马上又好了。我在网上找了很久都没有找到解决方案,还请各位多多指教。谢谢rnrn rn
我在用jdbc开发web时,为什么报Operation not allowed after ResultSet closed错误。
我有一个数据库工具类Mydb.java,它的代码如下:rnpublic class Mydb rn private Connection conn = null;rn private Statement stmt = null; rn private ResultSet rs = null;rn private PreparedStatement pstmt = null;rn /**rn * 这个方法不对外提供,除了这个类以外的都不需要调用rn */rn private Connection getConn() rn try rn rn String driverClassName=Env.getInstance().getProperty("driver");rn String url=Env.getInstance().getProperty("url");rn String password=Env.getInstance().getProperty("password");rn String user=Env.getInstance().getProperty("user");rn rn ComboPooledDataSource cpds = new ComboPooledDataSource(); rn cpds.setDriverClass(driverClassName); rn cpds.setJdbcUrl(url); rn cpds.setUser(user); rn cpds.setPassword(password); rn cpds.setMaxStatements(180); rn cpds.setMaxPoolSize(100); rn conn=cpds.getConnection();rn rn /*rn Class.forName(driverClassName);rn conn= DriverManager.getConnection(url,user,password); rn */ rn stmt = conn.createStatement();rn catch (Exception e) rn e.printStackTrace(); rn rn return conn;rn rn public ResultSet getResultSet(String sql) rn rn try rn if(conn==null)rn conn = getConn();rn rn rs = stmt.executeQuery(sql);//第68行rn catch (SQLException e) rn e.printStackTrace();rn rn return rs;rn rn rn public int executeUpdate(String sql) rn int i=0;rn try rn if(conn==null)rn conn = getConn();rn rn i=stmt.executeUpdate(sql);rn catch (SQLException e) rn e.printStackTrace();rn finallyrn close();rn rn return i;rn rn public int execute(String sql) rn int i=0;rn try rn if(conn==null)rn conn = getConn();rn rn i=stmt.executeUpdate(sql);rn catch (SQLException e) rn e.printStackTrace();rn rn return i;rn rn public void close() rn try rn if(rs != null) rn rs.close();rn rs = null;rn rn if(stmt != null) rn stmt.close();rn stmt = null;rn rn if(conn != null) rn conn.close();rn conn = null;rn rn catch (SQLException e) rn e.printStackTrace();rn rn rnrn但是我在另外一下类中写了一个方法,该方法中的代码如下:rnpublic void run() rn System.out.println("系统自动检测是否存在应放入公海中的信息!"); rn int tel=0;//参数一rn int sm1=0;//参数二rn int sm2=0;//参数三rn String rq1="";rn String rq2="";rn String rq3="";rn String rq="";rn int id=0;rn String gh="";rn String oldywy="";rn String yywy="";rn String sql="";rn Mydb db=new Mydb();rn ResultSet r=db.getResultSet("select tel,sm1,sm2 from t_cansubiao"); rn try rn if(r.next())rn tel=r.getInt("tel");rn sm1=r.getInt("sm1");rn sm2=r.getInt("sm2");rn rn rq1=ShiJian.Jianhour(tel);rn rq2=ShiJian.Jianday(sm1);rn rq3=ShiJian.Jianday(sm2);rn sql="select t_customer.id,t_customer.lxywy,t_user.username,t_customer.yywy from t_customer ,t_user where (t_customer.lxywy=t_user.gh) and ( t_customer.lx='客户' and t_customer.dhhfsj is null and t_customer.lrsj<>'' and t_customer.lrsj<>'' and t_customer.smhfsj);rn rn catch (SQLException e1) rn // TODO Auto-generated catch blockrn e1.printStackTrace();rn finallyrn db.close();rn rn rn出现的错误,为什么只循环了一次,就报错误:java.sql.SQLException: Operation not <em>allowed</em> <em>after</em> ResultSet <em>closed</em>rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)rn at com.mysql.jdbc.ResultSet.checkClosed(ResultSet.java:666)rn at com.mysql.jdbc.ResultSet.next(ResultSet.java:7274)rn at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:3066)rn at com.jykj.util.AdcTimerTask.run(AdcTimerTask.java:53)rn请问应如何解决,给个详细的解决方案
java.sql.SQLException: The SQL statement must not be null or empty.
以前我用的SQL Server 驱动是 com.microsoft.jdbc.sqlserver.SQLServerDriverrn现在公司用的SQL Server 驱动是 net.sourceforge.jtds.jdbc.Driverrnrn当我第一次进入一个查询方法可以把数据给读取出来,第二次进入另一个方法出现rn我的<em>statement</em>对象不是null值啊.?rnjava.sql.SQLException: The SQL <em>statement</em> must not be null or empty. rn net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1245)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)rn org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)rn $java.sql.Wrapper$$EnhancerByProxool$$bb6beb70.executeQuery()rn com.landray.kmss.km.coustomtable.dao.jdbc.KmCustbDataOperaDaoImp.findByPrimaryKey(KmCustbDataOperaDaoImp.java:191)rn com.landray.kmss.km.coustomtable.service.spring.KmCustbDataOperaServiceImp.findByPrimaryKey(KmCustbDataOperaServiceImp.java:28)rn com.landray.kmss.km.coustomtable.actions.KmCustbDataOperaAction.view(KmCustbDataOperaAction.java:148)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn .....rn rn 现在晕死了...能给有用意见的都有分,不够我加分
代价树的广度优先搜索 带有open表和closed表的显示
代价树的广度优先搜索 带有open表和<em>closed</em>表的显示
EJB3.0在取得数据源之后,第二次操作数据时 java.sql.SQLException: The statement is closed
EJB3.0在取得数据源之后,如果执行完插入数据操作后,总是提示,让我自己关闭连接,rnrn代码改了之后,第一次执行没<em>问题</em>,第二次在插入数据时,提示,java.sql.SQLException: The <em>statement</em> is <em>closed</em>异常,sql语句没<em>问题</em>rn就一个WEB工程里面的一个简单的页面传参,rnrn我的代码看了没看出什么<em>问题</em>rnprivate EntityManager entityManager;rn @Resource(mappedName = "OracleDS")rn private DataSource ds;rn private Statement sta;rn private ResultSet set;rn private Connection con;rn private String sql;rn public void getStatement()rn if(sta==null||con==null)rn try rn con=ds.getConnection();rn sta=con.createStatement();rn catch (SQLException e) rn System.out.println("取得连接异常");rn e.printStackTrace();rn rn rn rn public void close() throws SQLExceptionrn if(set!=null)rn set.close();rn set=null;rn rn if(sta!=null)rn sta.close();rn set=null;rn rn if(con!=null)rn con.close();rn set=null;rn rn rn下面是保存数据操作rnpublic void save(String TableName,String pFieldList,String pValueList) throws SQLException rn try rn sql="insert into "+TableName+"("+pFieldList+")values("+pValueList+")";rn getStatement();rn sta.executeUpdate(sql);rn catch (RuntimeException re) rn throw re;rn finallyrn close();rn rn rnrnrnrn如果,是用JAVA工程就没这么多提示,就运行一次直接通过。但是必顺不能加close那方法,要不一次也执行不了就提示The <em>statement</em> is <em>closed</em>.异常,我都感觉很奇怪
Hadoop OperationsPDF
Hadoop Operations
Operations Research Applications and Algorithms
Operations Research Applications and Algorithms 4E
W. Winston, Operations Research Applications and Algorithms
W. Winston, Operations Research Applications and Algorithms
Statement和PreparedStatement之间的区别
Statement和PreparedStatement之间的区别
protobuf-2.4.1与protoc-gen-lua压缩文件
具体操作,可根据我的个人博文进行。.proto文件生成_Pb.lua文件使用工具。
Adobe After Effects
AE教程视频,作者是ak,ak是全球十大ae高手,E3D插件的发布者。
Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your
[size=16px]前言:[/size][color=#FF0000][/color]求帮助 被这个错弄崩溃了。很多人都崩溃了!因为这个错明明没有错!求大神rn具体报错:[color=#FF0000]严重: Servlet.service() for servlet [ji543box] in context with path [/springMVC] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.] with root causernorg.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rn at org.springframework.orm.hibernate3.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:1175)rn at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:685)rn at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:1)rn at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)rn at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)rn at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:683)rn at sen.shu.wu.dao.BinfoDao.add(BinfoDao.java:22)rn at sen.shu.wu.service.LoveService.findAll(LoveService.java:52)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[/color]rnrnrn报这个错 你可能会想看我的spring事务的配置:rn[code=java] rnrn rn rn rn rn rn rn rn rn rn rn [/code]rn[code=java]@Repository("infoDao")rnpublic class BinfoDao extends HibernateDaoSupport implements IbinfoDao rn @Resourcern public void setSuperSessionFactory(SessionFactory sessionFactory) rn this.setSessionFactory(sessionFactory);rn rn rn rn @Overridern public void add(Binfo info) rn [color=#FF0000] this.getHibernateTemplate().save(info);[/color]这是22行 这里报错rn rn rn @Overridern public void update(Binfo info) rn this.getHibernateTemplate().update(info);rn rnrn @Overridern public void delete(int bid) rn Binfo info = this.load(bid);rn this.getHibernateTemplate().delete(info);rn rn rn @Overridern public Binfo load(int bid) rn return this.getHibernateTemplate().load(Binfo.class, bid);rn rn rn rn[/code]rnrnrnrnrn这个表的model:rn[code=java]rn@Entityrn@Table(name="info")rnpublic class Binfo rn private int bid;rn private String openid;rn private Boolean bsex;rn private Boolean bbutton;rn rn rn rn @GeneratedValuern @Idrn public int getBid() rn return bid;rn rn public void setBid(int bid) rn this.bid = bid;rn rn public String getOpenid() rn return openid;rn rn public void setOpenid(String openid) rn this.openid = openid;rn rn public Boolean getBsex() rn return bsex;rn rn public void setBsex(Boolean bsex) rn this.bsex = bsex;rn rn public Boolean getBbutton() rn return bbutton;rn rn public void setBbutton(Boolean bbutton) rn this.bbutton = bbutton;rn rn rn rn rnrn[/code]rnrn最郁闷的是:这个项目已经完成大量的功能了,在那些功能里面有大量的DAO方法 里面的add save 都是一样的 就是操作的表不一样 但是都不会报错!
AFTER EFFECTS Shine插件
AFTER EFFECTS Shine插件
Oracle语法监听工具 statement tracer for oracle
非常好用,给有需要的人,只要打开就可以监听通过tns连接oracle的所有语法
JDBC中,如果ResultSet 和 Statement 不关闭的话,会有什么影响
JDBC中,如果ResultSet 和 Statement 不关闭的话,会有什么影响!值得下载看看!资源免费,大家分享!!
Statement Tracer for ODBC
ODBC数据源SQL语句执行跟踪监控工具,监测你的应用程序通过ODBC执行的SQL语句操作。
IO Connection reset !java.sql.SQLException: Already closed,可能是DBCP的问题。。
java.sql.SQLException: Io 异常: Connection resetrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)rnrn at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:350)rn at com.common.html.vo.IndexVo.initTOP_AD(IndexVo.java:147)rn at com.common.html.vo.IndexVo.init(IndexVo.java:42)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn java.sql.SQLException: Already <em>closed</em>.rn at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:377)rn at com.common.html.vo.IndexVo.initTOP_AD(IndexVo.java:147)rn at com.common.html.vo.IndexVo.init(IndexVo.java:42)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn (DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn java.sql.SQLException: Io 异常: Connection resetrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)rnrn at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:350)rn at com.common.html.vo.IndexVo.parseLogo(IndexVo.java:407)rn at com.common.html.vo.IndexVo.init(IndexVo.java:43)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn (DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn java.sql.SQLException: Already <em>closed</em>.rn at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:377)rn at com.common.html.vo.IndexVo.parseLogo(IndexVo.java:407)rn at com.common.html.vo.IndexVo.init(IndexVo.java:43)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn (DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn at java.lang.Thread.run(Thread.java:619)rnjava.sql.SQLException: Io 异常: Connection resetrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)rn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)rn at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:815)rnrn at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:350)rn at com.common.html.vo.IndexVo.parserFlash(IndexVo.java:84)rn at com.common.html.vo.IndexVo.init(IndexVo.java:44)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn (DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn java.sql.SQLException: Already <em>closed</em>.rn at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84)rn at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)rn at com.common.html.dao.jdbc.JdbcUtil.getList(JdbcUtil.java:377)rn at com.common.html.vo.IndexVo.parserFlash(IndexVo.java:84)rn at com.common.html.vo.IndexVo.init(IndexVo.java:44)rn at com.common.html.vo.IndexVo.(IndexVo.java:18)rn (DelegatingConstructorAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at java.lang.Class.newInstance0(Class.java:355)rn at java.lang.Class.newInstance(Class.java:308)rn at com.common.html.vo.VoFactory.createVo(VoFactory.java:13)rn at com.inte.web.action.CreateAction.execute(CreateAction.java:29)rn
描述Connection、Statement、ResultSet接口的作用
描述Connection、Statement、ResultSet接口的作用
Adobe After Effects CC 2015经典教程(pdf版-高清文字)
Adobe公司推出的权v经典教程 畅销全球20年的图书 在全世界以27种语言火爆发行 以实例引导的正规学习用书。 让每位After Effects用户有机会学习Adobe专家的使用技巧。 提供完整教学资源:素材文件、复习题及答案。
【amtemu】After Effects 2017 CC -14.0完美破解补丁
【amtemu】After Effects 2017 CC -14.0完美破解补丁,亲测可行!!
ssh2中报Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL
在做注册和更新时就会这个错误,麻烦高手棒棒忙,谢谢rn错误信息:严重: Servlet.service() for servlet default threw exceptionrnorg.springframework.dao.InvalidDataAccessApiUsageException: Write <em>operations</em> are not <em>allowed</em> in [color=#FF0000]read-only [/color]mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.rnrn我的applicationContext.xml是rn[code=XML]rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn true rn rn truern rn falsern gbkrn rn truern truern rn rn <em>after</em>_transactionrn rn rn rn rn rn com/jndi/test/pojo/User.hbm.xmlrn com/jndi/test/pojo/Groups.hbm.xmlrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]rn++++++++++++++++++++++++++++++++++++++++++++++++++rn我的struts.xml是rn[code=XML]rnrnrnrn rn rn /all.jsprn /add.jsprn /ok.jsprn rn rn[/code]rn+++++++++++++++++++++++++++++rn我的web.xml是:rn[code=XML]rnrn rn login.jsprn rn rn rn contextConfigLocationrn rn classpath:applicationContext.xml,classpath:applicationContext-*.xmlrn rn rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn rn org.springframework.web.context.request.RequestContextListenerrn rn rn rn rn OpenSessionInViewFilterrn rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn rn OpenSessionInViewFilterrn /*rn rn rn rn struts2 rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn struts2rn *.actionrn rn rn struts2rn *.jsprn rn rn struts2rn /struts/*rn rn rn struts-cleanuprn org.apache.struts2.dispatcher.ActionContextCleanUp rn rn rn rn struts-cleanuprn /*rn rn[/code]rn谢谢
Spring+Hibernate+Dwr里出错:Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL):
我用Spring+Hibernate链接时,在增删改时会报错:rnWrite <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL):rn我的applicationContext.xml是这样写的:rn[code=XML]rnrnrnrnrnrnrnrnrnrnrnrnrnrnrn rnrnrn rnrn rnrn rn rn rn rnrn rnrnrnrnrnrnrnrnrn rn rn rn rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIRED,readOnlyrn rn rn rnrn[/code]rn-------rnhibernate 的dao是继承了HibernateDaoSupport的方法.rnrn[code=Java]rnpublic void save(WebNews transientInstance) rn log.debug("saving WebNews instance");rn try rn getHibernateTemplate().save(transientInstance);rn log.debug("save successful");rn catch (RuntimeException re) rn log.error("save failed", re); rnrn /*在此报错 :Write <em>operations</em> are not <em>allowed</em> in read-only mode (FlushMode.NEVER/MANUAL): rnrn * Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from rnrn * transaction definition.rn */rn throw re;rn rn rnrn[/code]rnrn总觉得是配置文件出<em>问题</em>,但不知该怎么改进,望诸位大侠帮帮忙!rn小生这里先谢过各位!
Adobe After Effects CS6中文版经典教程 pdf电子书
Adobe After Effects CS6中文版经典教程978-7-115-33999-7_13522100
close caption(加拿大)
close caption standard for (加拿大)
Closed_Power_Cycles
Closed_Power_Cycles, about the energy cycles.
撤销关闭选项卡 Sexy Undo Close Tab chrome插件
安装 Sexy Undo Close Tab 之后,会在 CHROME 右上角工具栏生成一个小图标,点击该小图标就可以看到最近关闭的标签页,默认收录最近20个关闭的标签页,用户也可以通过扩展的设置页面改变这个数值。 值得一提的是,在最近关闭的标签页列表中,还显示网站的 Favicon 和从标签关闭到你点击图标的时间,可以更加精准的确定你将要重新打开哪一个标签,另外扩展的设置页面也有很多让使用更加方便的设置,比如显示列表中网址的 数量、改变弹窗界面元素的风格等等。
closed caption
介绍<em>closed</em> caption相关知识,主要给数字电视软件开发人员提供参考。
After Effects CC中文版超级学习手册 pdf电子书
After Effects CC中文版超级学习手册978-7-115-35429-7 _13590059
Adobe After Effects CS4高手之路 .李涛.扫描版.pdf
《Adobe After Effects CS4高手之路》由Adobe中国资深专家李涛先生倾力编写,是一本讲解After Effects影视动画技术的案例书。全书共分为10章,第1章阐述了After Effects的基本概念、用途及合成的基本流程;第2章和3章介绍了Mask的基础操作 ;第4章介绍了三维合成功能 ;第5章和第6章讲解了调色技巧和抠像功能 ;第7章至第10章,通过诸多实例讲解了光线特效、艺术化特效、三维仿真特效以及其他影视后期合成常用的处理手法。 《Adobe After Effects CS4高手之路》内容丰富,结构清晰,技术参考性强,讲解由浅入深且循序渐进,涵盖面广又不失细节描述的清晰细致。
BS EN 61000-4-8 2010
Performance criteria B description: During the test, degradation of performance is <em>allowed</em>. However, no change of operating state or stored data is <em>allowed</em> to persist <em>after</em> the test. After the test, the EUT shall continue to operate as intended without operator intervention. No degradation of performance or loss of function is <em>allowed</em>, <em>after</em> the application of the phenomena below a performance level specified by the manufacturer, when the EUT is used as intended. Performance criteria C description: During and <em>after</em> testing, a temporary loss of function is <em>allowed</em>, provided the function is self recoverable, or can be restored by the operation of the controls or cycling of the power to the EUT by the user in accordance with the manufacturer’s instructions. Functions, and/or information stored in non-volatile memory, or protected by a battery backup, shall not be lost.
文章热词 After Effects(AE)价格 After Effects(AE) After Effects(AE)视频教程 After Effects(AE)课程 After Effects(AE)学习
相关热词 c++问题 bootstrap 问题 c++a+b问题 合唱队形问题c# 区块链问题 学习python时遇到的问题
我们是很有底线的