当ORACEL关闭再次重新启动的时候,Spring连接数据库报错socket write error,提示Already closed [问题点数:100分,结帖人lgmsyy]

Bbs1
本版专家分:76
结帖率 100%
Bbs7
本版专家分:10682
tomcat连接池,重复多次调用方法出错: Connection is closed
配置了一个tomcat连接池, 然后多次重复调用下面方法getStaticEntiy() ,部分能获取数据,部分<em>报错</em>误:java.sql.SQLException: Connection is clo
JDBC 连接池配置文件 解决了already close问题
XML文件 DataSource配置 &amp;lt;bean id=&quot;dataSource&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot;&amp;gt;         &amp;lt;property name=&quot;driverClassName&quot; value=&quot;${driver}&quot;/&amp;gt;         &amp;lt;property name=&quot
创建完定时任务启动的时候报DataSourceClosedException: dataSource already closed
这是由于项目中其他规则的定时任务影响导致,所以要解决这个问题,就要将同一个定时任务的另一种注释掉 例如:我的项目中集成了了elastic-job框架,然后先目中本来就有<em>spring</em> boot自带的定时任务,然后将<em>spring</em> boot的定时任务修改成  elastic-job类型的任务,让后启动就<em>报错</em>了,这是由于<em>spring</em> boot的定时任务执行完以后将数据源关掉导致,所以只需要一种定时任务就...
在Spring + mybatis 整合的时候报获取数据库连接错误
-
socket write error
浏览器下载Excel时<em>报错</em>,但是文件正常下载了,rnrn这是错误日志:rnClientAbortException: java.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>Bytes(OutputBuffer.java:381)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>(OutputBuffer.java:370)rn at org.apache.catalina.connector.CoyoteOutputStream.<em>write</em>(CoyoteOutputStream.java:89)rn at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)rn at java.io.BufferedOutputStream.<em>write</em>(BufferedOutputStream.java:109)rn at com.lmykt.tools.Excelreader.downLoadData(Excelreader.java:319)rn at com.lmykt.tools.ToExcel.jsonOneToExcel(ToExcel.java:322)rn at com.lmykt.newkq.action.KqrpcardtimeAction.excelOrg(KqrpcardtimeAction.java:593)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 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)rn at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)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.doGet(ActionServlet.java:414)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 com.lmykt.tools.SetEncodeFilter.doFilter(SetEncodeFilter.java:42)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)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:127)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:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:760)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:784)rn at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:593)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)rn ... 36 morernrn这是<em>报错</em>的源码rnpublic static void downLoadData(HttpServletResponse response,rn File returnFile, String uploadedFileName) rn response.setHeader("Content-disposition", "attachment; filename="rn + uploadedFileName);rn response.setHeader("Content-Type", "application/octet-stream");rnrn BufferedInputStream bis = null;// 读excelrn BufferedOutputStream bos = null;// 输出rnrn try rn // 读取excel文件rn bis = new BufferedInputStream(new FileInputStream(returnFile));rn // 写入response的输出流中rn bos = new java.io.BufferedOutputStream(response.getOutputStream());rn byte[] buff = new byte[2048];/* 设置缓存 */rn int bytesRead;rn while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) rn bos.<em>write</em>(buff, 0, bytesRead);rn rn catch (Exception e) rn e.printStackTrace();rn finally rn if (bis != null)rn try rn bis.close();rn catch (IOException e) rn e.printStackTrace();rn rn if (bos != null)rn try rn bos.close();rn catch (IOException e) rn e.printStackTrace();rn rn rn rn
Session was already closed
[code=Java]public class HibernateSessionFactory rn private static SessionFactory factory=null;rn private static Session session=null;rn static rn Configuration conf=new Configuration().configure();rn factory=conf.buildSessionFactory();rn rn public static SessionFactory getFactory() rn return factory;rn rn public static Session getSession()rn session=factory.openSession();rn return session;rn rn public static void closeSession()rn if(session!=null)rn session.close();rn rn rn rn rnrn[/code]rnrnrn[code=Java]rnpublic abstract class BaseHibernateDAO rn rn private Session session=null;rn protected Object get(Class clz,java.io.Serializable id)rn Object ret=null;rn Session session=this.getSession();rn tryrn ret=session.get(clz, id);rn catch (Exception e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return ret;rn rn protected int add(Object item)rn int num=0;rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.save(item);rn tx.commit();rn rn catch (Exception e) rn ++num;rn if(tx!=null)tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return num;rn rn protected void update(Object item)rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.update(item);rn tx.commit();rn rn catch (Exception e) rn if(tx!=null)tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn rn protected int delete(Class clz,java.io.Serializable id)rn int num=0;rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.delete(this.get(clz, id));rn tx.commit();rn rn catch (Exception e) rn ++num;rn tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return num;rn rn protected List search(Class clazz,Object condition) rn try rn List results=this.getSession().createCriteria(clazz).add(Example.create(condition)).list();rn return results;rn catch (RuntimeException e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return null;rn rn protected List search(Class clazz) rn try rn List results=this.getSession().createCriteria(clazz).list();rn return results;rn catch (RuntimeException e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return null;rn rn rn protected Session getSession() rn this.session=HibernateSessionFactory.getSession();rn return this.session;rn rn public void setSession(Session session) rn this.session = session;rn rn protected void closeSession()rn this.session=null;rn HibernateSessionFactory.closeSession();rn rn rn rn rn rnrnrn[/code]rnrnrnrn[code=Java]public abstract class BaseHibernateDAO rn rn private Session session=null;rn protected Object get(Class clz,java.io.Serializable id)rn Object ret=null;rn Session session=this.getSession();rn tryrn ret=session.get(clz, id);rn catch (Exception e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return ret;rn rn protected int add(Object item)rn int num=0;rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.save(item);rn tx.commit();rn rn catch (Exception e) rn ++num;rn if(tx!=null)tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return num;rn rn protected void update(Object item)rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.update(item);rn tx.commit();rn rn catch (Exception e) rn if(tx!=null)tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn rn protected int delete(Class clz,java.io.Serializable id)rn int num=0;rn Transaction tx=null;rn Session session=this.getSession();rn try rn tx=session.beginTransaction();rn session.delete(this.get(clz, id));rn tx.commit();rn rn catch (Exception e) rn ++num;rn tx.rollback();rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return num;rn rn protected List search(Class clazz,Object condition) rn try rn List results=this.getSession().createCriteria(clazz).add(Example.create(condition)).list();rn return results;rn catch (RuntimeException e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return null;rn rn protected List search(Class clazz) rn try rn List results=this.getSession().createCriteria(clazz).list();rn return results;rn catch (RuntimeException e) rn e.printStackTrace();rn finallyrn this.closeSession();rn rn return null;rn rn rn protected Session getSession() rn this.session=HibernateSessionFactory.getSession();rn return this.session;rn rn public void setSession(Session session) rn this.session = session;rn rn protected void closeSession()rn this.session=null;rn HibernateSessionFactory.closeSession();rn rn rn rn rn rnrn[/code]rnrnrnrn我第一次执行的是search()方法,session在finally里就<em>关闭</em>了,rnrn但是在之后执行delete()方法是,他就<em>报错</em>说session is <em>already</em> <em>closed</em>,但是我在delete()方法里有getSession()呀rn怪事!rn
Socket示例报错Software caused connection abort: socket write error
[code=java]package com.<em>socket</em>;rnrnpublic class test rn public static void main(String[] args) rn new <em>socket</em>Listener().start();rn rnrn[/code][code=java]package com.<em>socket</em>;rnrnimport java.io.IOException;rnimport java.net.ServerSocket;rnimport java.net.Socket;rnrnpublic class <em>socket</em>Listener extends Thread rn public void run() rn try rn ServerSocket serverSocket = new ServerSocket(12345);rn while(true)rn rn Socket <em>socket</em>=serverSocket.accept();rn System.out.println("有客戶端连接到本机");rn new chat<em>socket</em>(<em>socket</em>).start();rn rn catch (IOException e) rn e.printStackTrace();rn rn rn rn rnrn[/code][code=java]package com.<em>socket</em>;rnrnimport java.io.IOException;rnimport java.io.OutputStream;rnimport java.io.UnsupportedEncodingException;rnimport java.net.Socket;rnrnpublic class chat<em>socket</em> extends Thread rn private Socket <em>socket</em>;rnrn public chat<em>socket</em>(Socket <em>socket</em>) rn this.<em>socket</em> = <em>socket</em>;rn rn public void out(String out)rn try rn OutputStream outputStream=<em>socket</em>.getOutputStream();rn outputStream.<em>write</em>((out+"\n").getBytes("UTF-8"));rn catch (UnsupportedEncodingException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn rn public void run() rn int count=0;rn while(true)rn rn count++;rn out("loop:="+count);rn rn rn rn[/code]rn[img=https://img-bbs.csdn.net/upload/201412/23/1419308455_109817.png][/img]rn我使用的是浏览器访问本地的12345端口
java.sql.SQLException: Already closed
tomcate6,大概启动后运行半小时就<em>报错</em>,而且整个程序无法访问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.<em>spring</em>framework.orm.hibernate3.LocalDataSourceConnectionProvider.closeConnection(LocalDataSourceConnectionProvider.java:96)rn at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:474)rn
Could not close JDBC connection Already closed.
<em>spring</em>整合tomcat jndi数据源报Could not close JDBC Connection java.sql.SQLException: Al 博客分类:  <em>spring</em> jdbctomcat<em>spring</em>jndi  详细错误信息如下:  org.<em>spring</em>framework.jdbc.datasource.DataSourceUtils -564890
jfinal使用定时任务quartz操作数据库抛出异常:com.alibaba.druid.pool.DataSourceClosedException: dataSource already clo
在jfinal项目中使用定时任务quartz,后台会一直抛异常:com.jfinal.plugin.activerecord.ActiveRecordException: com.alibaba.druid.pool.DataSourceClosedException: dataSource <em>already</em> <em>closed</em> at Tue S
由多次使用Statement实例引起的Result set already closed异常的解决方案
最近由于在不同版本的Weblogic平台上迁移应用,产生了很严重的JDBC驱动版本不兼容的问题。 但是归根究底是代码的问题,废话少说,上代码示例。 ..... //以下是问题代码 ResultSet rs=null; Statement st=null; rs=s
关于报错:IllegalStateException: attempt to re-open an already-closed 的解决方法
在尝试用子线程获取数据库数据时跳出错误attempt to re-open an <em>already</em>-<em>closed</em>,一开始在网上查询的<em>时候</em>都说是数据库提前<em>关闭</em>引发的错误,我认为我在这个子页面一直没有<em>关闭</em>数据库,为什么会说我<em>关闭</em>了数据库呢?后来发现是我在主页面时获取其他数据,<em>关闭</em>了数据库,所以在子页面里的子线程里打开时发生了错误。...
神奇的weblogic,Connection关闭与Result set already closed
最近新写的一套JAVA封装类,运行期间出现了“java.sql.SQLException: Result set <em>already</em> <em>closed</em>”错误,出现的机率比较高,但又有一定的随机性,注释掉Resultset的close代码后问题依旧。 连接代码如下: javax.naming.Context initCtx = new javax.naming.InitialContext();
【求助】socket write error错误~~
在两台服务器上同时布署一套同样的程序,在一台服务器上正常,另外一台运行不了多久就报下面这个错误,请问是怎么回事?想了很多办法都没有解决?rnrnjava.sql.SQLException: Io 异常: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:335)rn at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:503)rn at oracle.jdbc.driver.OracleStatement.(OracleStatement.java:518)rn at oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnrnection.java:680)rn at oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.rnjava:582)rn at org.apache.commons.dbcp.DelegatingConnection.createStatement(DelegatirnngConnection.java:180)rn at lonwin.util.TomcatPool.init(TomcatPool.java:42)rn
weblogic的socket write error问题
重启weblogic后,然后在原有的IE上页面上做刷新操作,这时session超时弹出重新登录页面,后台会报Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>,谁知道这是为什么?
连接数据库时的Socket Error
Resin + SQL Server 2000,数据库驱动用微软带SP1的JDBC for SQL SERVER2000,连接池用网上最常见的DBConnectionManager。rn使用几小时后,就会出现ODBC Socket Error。rn不知哪位见过这问题?rn
为什么Tomcat报错:socket write error?
从jsp代码看不出什么错误了,但还是<em>报错</em>,什么原因呢?rnrn2003-11-07 16:13:23 StandardWrapperValve[default]: Servlet.service() for servlet default threw exceptionrnjava.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:126)rn at org.apache.ajp.Ajp13.send(Ajp13.java:525)rn at org.apache.ajp.RequestHandler.doWrite(RequestHandler.java:521)rn at org.apache.ajp.Ajp13.doWrite(Ajp13.java:399)rn at org.apache.ajp.tomcat4.Ajp13OutputStream.<em>write</em>(Ajp13OutputStream.java:79)rn at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:679)rn at org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.java:757)rn at org.apache.catalina.connector.ResponseBase.<em>write</em>(ResponseBase.java:652)rn at org.apache.catalina.connector.ResponseStream.<em>write</em>(ResponseStream.java:312)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:1903)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1652)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1197)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)rn at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)rn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)rn at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)rn at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)rn at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)rn at java.lang.Thread.run(Thread.java:536)rn
socket closed??
写了一个传文件的程序,我在服务器端搞了个按钮,里面的事件就是<em>关闭</em>服务(也就是<em>关闭</em>端口),rn但按下去后抛异常?rnjava.net.SocketException: <em>socket</em> <em>closed</em>rnjava.net.SocketException: <em>socket</em> <em>closed</em>rn at java.net.PlainSocketImpl.<em>socket</em>Accept(Native Method)rn at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)rn at java.net.ServerSocket.implAccept(ServerSocket.java:450)rn at java.net.ServerSocket.accept(ServerSocket.java:421)rn at itsys.yr.ServerStart.startServer(ServerStart.java:41)rn at itsys.yr.ServerTest.run(ServerTest.java:84)rn at java.lang.Thread.run(Thread.java:595)rn
Mysql Connection already closed
参考:https://stackoverflow.com/questions/36314890/connection-<em>already</em>-<em>closed</em>采纳最多的一个update2,之后重启tomcat
求助:java.sql.SQLException: Already closed总是自动关闭(奇怪)
我打开jsp页面后,出现以下代码,重启tomcat就可以正常,不知道什么原因。用的是mysql数据库。请高手明示。 HTTP Status 500 - ------------------------
使用druid连接池的超时回收机制排查连接泄露问题
在工程中使用了druid连接池,运行一段时间后
sql 异常 Already closed 如何解决?
如题,请各抒己见,谢谢
急啊,在线,高手指点 java.sql.SQLException: Already closed
2009-11-11 18:09:27 - cn.yicha.marketing.charge.exception.AbsCustomException -441873 ERROR cn.yicha.
java.lang.IllegalStateException: BeanFactory not initialized or already closed
在进行SSh整合时,启动服务器出现了很多异常,其中一个是Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor,但是我已经添加了aopalliance-1.0.jar,还是找不到这个类,rn[code=java]严重: Exception sending context initialized event to listener instance of class org.<em>spring</em>framework.web.context.ContextLoaderListenerrnorg.<em>spring</em>framework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at org.<em>spring</em>framework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:413)rn at org.<em>spring</em>framework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)rn at org.<em>spring</em>framework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)rn at org.<em>spring</em>framework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)rn at org.<em>spring</em>framework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)rn at org.<em>spring</em>framework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)rn at org.<em>spring</em>framework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.<em>spring</em>framework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.<em>spring</em>framework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptorrn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2854)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at org.<em>spring</em>framework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:127)rn at org.<em>spring</em>framework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:84)rn at org.<em>spring</em>framework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)rn at org.<em>spring</em>framework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1424)rn at org.<em>spring</em>framework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1414)rn at org.<em>spring</em>framework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:187)rn at org.<em>spring</em>framework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)rn at org.<em>spring</em>framework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:110)rn at org.<em>spring</em>framework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508)rn at org.<em>spring</em>framework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)rn ... 37 morernCaused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptorrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn ... 55 morern2014-12-14 16:30:43 org.apache.catalina.core.StandardContext startrn严重: Error listenerStartrn2014-12-14 16:30:43 org.apache.catalina.core.StandardContext startrn严重: Context [/ssh] startup failed due to previous <em>error</em>srn2014-12-14 16:30:43 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn2014-12-14 16:30:43 org.apache.catalina.core.StandardContext listenerStoprn严重: Exception sending context destroyed event to listener instance of class org.<em>spring</em>framework.web.context.ContextLoaderListenerrnjava.lang.IllegalStateException: BeanFactory not initialized or <em>already</em> <em>closed</em> - call 'refresh' before accessing beans via the ApplicationContextrn at org.<em>spring</em>framework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:921)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:895)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:841)rn at org.<em>spring</em>framework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:579)rn at org.<em>spring</em>framework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)rn at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4249)rn at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4890)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4754)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)[/code]rnrn求救,已经搞了半个下午了
socket closed
会造成<em>socket</em> <em>closed</em> 的原因有哪些?
socket is closed
package Server.model;rnrnimport i.qq.common.Message;rnrnimport java.io.IOException;rnimport java.io.ObjectInputStream;rnimport java.net.Socket;rnrnpublic class qqServerThread extends Threadrn Socket s=null;rn rnpublic qqServerThread(Socket s) rn this.s=s;// TODO 自动生成的构造函数存根rn rnrnpublic void run()rn while(true)rn try rn ObjectInputStream ois=new ObjectInputStream(s.getInputStream());rn Message ms=(Message)ois.readObject();rn System.out.print(ms.getId()+"对"+ms.getSender()+"说:"+ms.getInformation());rn catch (IOException e) rn // TODO 自动生成的 catch 块rn e.printStackTrace();rn catch (ClassNotFoundException e) rn // TODO 自动生成的 catch 块rn e.printStackTrace();rn rn rn rnrnrn服务器rnrnpackage Server.model;rnrnimport i.qq.common.Message;rnimport i.qq.common.User;rnrnimport java.io.IOException;rnimport java.io.ObjectInputStream;rnimport java.io.ObjectOutputStream;rnimport java.net.ServerSocket;rnimport java.net.Socket;rnimport java.security.interfaces.RSAKey;rnimport java.sql.ResultSet;rnimport java.sql.SQLException;rnrnimport qq.server.DB.qqServerSqlHelp;rnrnpublic class Serverqq rn qqServerSqlHelp qqss=null;rn public Serverqq() rn System.out.print("服务器在9999端口监听");rn try rn ServerSocket ss = new ServerSocket(9999);rn while (true) rn Socket s = ss.accept();rn ObjectInputStream ois = new ObjectInputStream(rn s.getInputStream());rn User u = (User) ois.readObject();rn Message ms = new Message();rn String sql = "select 用户名 from Denlu where 用户名=? and 密码=?";rn String pasa[] = u.getUs(), u.getPw() ;rn qqss = new qqServerSqlHelp();rn ResultSet rs = qqss.Query(sql, pasa);rn ObjectOutputStream oos = new ObjectOutputStream(rn s.getOutputStream());rn if (rs.next()) rn rs.getString(1);rn ms.setMessType("1");rn rn //一对一单开一个线程rn qqServerThread qqst=new qqServerThread(s);rn qqst.start();rn else rn ms.setMessType("2"); rn rn oos.<em>write</em>Object(ms);rn s.close();rn rn catch (IOException e) rn // TODO 自动生成的 catch 块rn e.printStackTrace();rn catch (ClassNotFoundException e) rn // TODO 自动生成的 catch 块rn e.printStackTrace();rn catch (SQLException e) rn // TODO 自动生成的 catch 块rn e.printStackTrace();rn finallyrn qqss.close();rn rn rnrnrn
错误原因:java.sql.SQLException:Already closed
开了一个定时,在<em>连接数据库</em>层执行Sql的<em>时候</em>,后台jboss<em>报错</em>rnjava.sql.SQLException:Already <em>closed</em>rn请问原因!rnrn我不发布的,单独测试的<em>时候</em>,代码从头到尾都没有错误
后台报错Connection reset by peer: socket write error
[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rnrn我的系统是MS SQL SERVER 2000做的数据库,采用tomcat的dataSource做的连接池,问题是:rn我对数据库进行还原操作,成功后,<em>重新启动</em>数据库服务器!然后跳转到登录页面,而这时就会报 以下错误!rnjava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rnat com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)rnat com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rnat com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rnat com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown Source)rnat com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)rnat com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)rnat org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)rnat xnc.db.query.DBQuery.getRs(DBQuery.java:60)rnat org.apache.jsp.login_jsp._jspService(login_jsp.java:145)rnat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rnat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rnat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rnat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rnat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rnat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rnat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rnat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rnat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rnat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rnat org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rnat org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rnat java.lang.Thread.run(Unknown Source)rn报此错误的同时,数据库服务器是打开状态,即使我<em>重新启动</em>了 数据库服务器,依然会报此错误,我重新打开一个浏览器页,也一样报此错误!rn只有当我将TOMCAT<em>重新启动</em>后,才访问正常!rnrn这是为什么呢?难道连接池不能监听到数据库服务器的状态?必须重新对连接池初始化?非要重启tomcat?请高手指点!
java.sql.SQLException: Already closed. 请大家帮忙解答
exception javax.servlet.ServletException: Hibernate operation: Cannot release connection; uncategori
使用线程池插入数据报Could not open JDBC Connection for transaction 异常
前言 原因分析 解决方案 错误信息 前言 使用线程池插入数据报Could not open JDBC Connection for transaction 异常 Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.DataSourceClose...
ZkClient already closed
     最近项目在ice的新环境中部署总是报ZkClient <em>already</em> <em>closed</em>!错误,但是项目通过java -jar的方式是可以启动的,zookeeper是连通的,排除了zookeeper的问题之后,在想是什么问题,根据启动的日志是zookeeper的服务不能注册,这是表象的原因。经过详细的排查,后来在grid.err中发现是有一个文件没有写的权限导致了ice启动起来之后又<em>关闭</em>了,i...
DataSource和close方法
我想问的是conn的close方法 是否调用的是重写的colse()方法 老师这个close方法是把conn放回连接池 但不是调用close的方法 我感觉怪怪的 Servlet中使用数据源 Conte
今天线上系统碰到个怪问题DBCP数据连接异常,java.sql.SQLException: Already closed.
java.sql.SQLException: Already <em>closed</em>. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84) ~[commons-dbcp-1.2.2.jar:1.2.2] at org.apache.commons.dbcp.PoolingDataSource$Po
jdbc连接数据库时候报错
刚开始学jdbc。连接oracle的<em>时候</em>报下面的错误。驱动的jar包已经引入了。用的是纯净版的eclipes。rn[img=https://img-bbs.csdn.net/upload/201601/16/1452949777_20640.png][/img][img=https://img-bbs.csdn.net/upload/201601/16/1452950046_866331.png][/img]rn
间歇性报错Software caused connection abort: socket write error,求解!>_
我上传文件有时成功,有时失败~<em>报错</em>代码:rn----------------------rn文件名称值.txtrn保存路径C:\apache-tomcat-5.5.23\webapps\testxf\upload/rn文章编号24rn文章大小0rnHibernate: select bookimp0_.bookid as bookid3_0_, bookimp0_.afficheid as afficheid3_0_, bookimp0_.bookname as bookname3_0_, bookimp0_.bookinfo as bookinfo3_0_, bookimp0_.booktime as booktime3_0_ from book bookimp0_ where bookimp0_.bookid=?rnHibernate: insert into annex (bookid, annexname, annexpath, annexsize) values (?, ?, ?, ?)rn15:18:35,437 INFO DefaultRemoter:51 - Exec: AnnexManagerImp.showlist()rnHibernate: select count(*) as col_0_0_ from annex anneximp0_ where bookid=24rnHibernate: select anneximp0_.annexid as annexid2_, anneximp0_.bookid as bookid2_, anneximp0_.annexname as annexname2_, anneximp0_.annexpath as annexpath2_, anneximp0_.annexsize as annexsize2_ from annex anneximp0_ where bookid=24rn15:18:35,453 DEBUG Page:67 - New a page object: pageNum = 1; pageSize = 11; totalCount = 11; dataSize11rn15:18:35,468 ERROR DefaultConverterManager:75 - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'rnHibernate: select bookimp0_.bookid as bookid3_0_, bookimp0_.afficheid as afficheid3_0_, bookimp0_.bookname as bookname3_0_, bookimp0_.bookinfo as bookinfo3_0_, bookimp0_.booktime as booktime3_0_ from book bookimp0_ where bookimp0_.bookid=?rn文件名称代码.txtrn保存路径C:\apache-tomcat-5.5.23\webapps\testxf\upload/rn文章编号24rn文章大小0rnHibernate: select bookimp0_.bookid as bookid3_0_, bookimp0_.afficheid as afficheid3_0_, bookimp0_.bookname as bookname3_0_, bookimp0_.bookinfo as bookinfo3_0_, bookimp0_.booktime as booktime3_0_ from book bookimp0_ where bookimp0_.bookid=?rnHibernate: insert into annex (bookid, annexname, annexpath, annexsize) values (?, ?, ?, ?)rn15:18:55,109 INFO DefaultRemoter:51 - Exec: AnnexManagerImp.showlist()rnHibernate: select count(*) as col_0_0_ from annex anneximp0_ where bookid=24rnHibernate: select anneximp0_.annexid as annexid2_, anneximp0_.bookid as bookid2_, anneximp0_.annexname as annexname2_, anneximp0_.annexpath as annexpath2_, anneximp0_.annexsize as annexsize2_ from annex anneximp0_ where bookid=24rn15:18:55,125 DEBUG Page:67 - New a page object: pageNum = 1; pageSize = 12; totalCount = 12; dataSize12rn15:18:55,125 ERROR DefaultConverterManager:75 - No converter found for 'org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer'rnHibernate: select bookimp0_.bookid as bookid3_0_, bookimp0_.afficheid as afficheid3_0_, bookimp0_.bookname as bookname3_0_, bookimp0_.bookinfo as bookinfo3_0_, bookimp0_.booktime as booktime3_0_ from book bookimp0_ where bookimp0_.bookid=?rn文件名称值.txtrn保存路径C:\apache-tomcat-5.5.23\webapps\testxf\upload/rn文章编号24rn文章大小21542rnHibernate: select bookimp0_.bookid as bookid3_0_, bookimp0_.afficheid as afficheid3_0_, bookimp0_.bookname as bookname3_0_, bookimp0_.bookinfo as bookinfo3_0_, bookimp0_.booktime as booktime3_0_ from book bookimp0_ where bookimp0_.bookid=?rn15:19:00,625 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 08S01rn15:19:00,625 ERROR JDBCExceptionReporter:72 - I/O Error: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em>rn15:19:00,625 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 08S01rn15:19:00,640 ERROR JDBCExceptionReporter:72 - I/O Error: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em>rn错误org.<em>spring</em>framework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connectionrn过路大侠帮我一下,这个错让我郁闷得很rn
连接数据库报错提示
The archive:F:/JDBC/msutil.jar which is referenced by the classpath, does not exist. rnrn我知道是路径的问题,但不知道在哪里改。
java spring 连接数据库报错
九月 22, 2013 6:31:41 下午 org.apache.catalina.core.AprLifecycleListener initrnINFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.7.0_25\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Windows Live\Shared;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\Symantec\VIP Access Client\;C:\Program Files (x86)\Common Files\Lenovo;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jdk1.7.0_25\bin;C:\Program Files (x86)\tomcat\bin;C:\Program Files (x86)\PostgreSQL\bin;C:\php;C:\Program Files (x86)\eclipse;;.rn九月 22, 2013 6:31:41 下午 org.apache.coyote.AbstractProtocol initrnINFO: Initializing ProtocolHandler ["http-bio-8080"]rn九月 22, 2013 6:31:41 下午 org.apache.coyote.AbstractProtocol initrnINFO: Initializing ProtocolHandler ["ajp-bio-8009"]rn九月 22, 2013 6:31:41 下午 org.apache.catalina.startup.Catalina loadrnINFO: Initialization processed in 485 msrn九月 22, 2013 6:31:41 下午 org.apache.catalina.core.StandardService startInternalrnINFO: Starting service Catalinarn九月 22, 2013 6:31:41 下午 org.apache.catalina.core.StandardEngine startInternalrnINFO: Starting Servlet Engine: Apache Tomcat/7.0.41rn九月 22, 2013 6:31:42 下午 org.apache.catalina.startup.HostConfig deployDescriptorrnINFO: Deploying configuration descriptor E:\EclipseWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\AEMS.xmlrn九月 22, 2013 6:31:42 下午 org.apache.catalina.startup.SetContextPropertiesRule beginrnWARNING: [SetContextPropertiesRule]Context Setting property 'source' to 'org.eclipse.jst.jee.server:AEMS' did not find a matching property.rn九月 22, 2013 6:31:42 下午 org.apache.catalina.loader.WebappClassLoader validateJarFilernINFO: validateJarFile(E:\EclipseWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\AEMS\WEB-INF\lib\jsp-api-2.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.classrn九月 22, 2013 6:31:42 下午 org.apache.catalina.loader.WebappClassLoader validateJarFilernINFO: validateJarFile(E:\EclipseWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\AEMS\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.classrn九月 22, 2013 6:31:43 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Initializing Spring root WebApplicationContextrnlog4j:WARN No appenders could be found for logger (org.<em>spring</em>framework.web.context.ContextLoader).rnlog4j:WARN Please initialize the log4j system properly.rn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.StandardContext listenerStartrn[color=#FF0000]SEVERE: Exception sending context initialized event to listener instance of class org.<em>spring</em>framework.web.context.ContextLoaderListenerrnorg.<em>spring</em>framework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:/E:/EclipseWorkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AEMS/WEB-INF/classes/<em>spring</em>-web-beans.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection available[/color]rn at org.<em>spring</em>framework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)rn at org.<em>spring</em>framework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.<em>spring</em>framework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.<em>spring</em>framework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.<em>spring</em>framework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.<em>spring</em>framework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:546)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)rn at org.<em>spring</em>framework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)rn at org.<em>spring</em>framework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)rn at org.<em>spring</em>framework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)rn at org.<em>spring</em>framework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)rn at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:724)rnCaused by: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection availablern at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:106)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:148)rn at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)rn at org.<em>spring</em>framework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855)rn at org.<em>spring</em>framework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774)rn at org.<em>spring</em>framework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.<em>spring</em>framework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)rn at org.<em>spring</em>framework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)rn ... 26 morernrn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Set web app root system property: 'webapp.root' = [E:\EclipseWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\AEMS\]rn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Initializing log4j from [classpath:log4j-config.xml]rnlog4j:WARN Continuable parsing <em>error</em> 34 and column 11rnlog4j:WARN 元素类型为 "logger" 的内容必须匹配 "(level?,appender-ref*)"。rnlog4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.rn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.StandardContext startInternalrnSEVERE: Error listenerStartrn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.StandardContext startInternalrnSEVERE: Context [/AEMS] startup failed due to previous <em>error</em>srn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Shutting down log4jrn九月 22, 2013 6:31:45 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Closing Spring root WebApplicationContextrn九月 22, 2013 6:31:45 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrn[color=#FF0000]SEVERE: The web application [/AEMS] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.[/color]rn九月 22, 2013 6:31:45 下午 org.apache.coyote.AbstractProtocol startrnINFO: Starting ProtocolHandler ["http-bio-8080"]rn九月 22, 2013 6:31:45 下午 org.apache.coyote.AbstractProtocol startrnINFO: Starting ProtocolHandler ["ajp-bio-8009"]rn九月 22, 2013 6:31:45 下午 org.apache.catalina.startup.Catalina startrnINFO: Server startup in 3205 msrnrn请问这是数据库连接不上造成的吗?rn有没有可能是因为我数据库在linux上备份,然后恢复到windows时,LC_COLLATE不一致造成的?还是另有别的原因?rn麻烦了……
oracle spring 连接数据库 报错
1.JDWP Unable to get JNI 1.2 environment 把eclipse重启 2.Io 异常: The Network Adapter could not establish the connection A ResourcePool could not acquire a resource from its primary factory or source. ...
数据库连接池应用中数据库服务器断开超时连接的问题
数据库应用开发过程中,我们可能会遇到一个问题:应用使用了数据库连接池,每经过指定时间后,发出到数据库服务器的任何请求都会失败,而且有且仅有一次失败,之后的正常访问都没有问题。尤其是在Web应用中,如果晚上时段没有访问,而第二天第一个访客的经历就是碰到一个数据库访问错误,如果开发系统的程序员没有注意这个问题的话,可能终端用户访问会看到抛出的一堆数据库异常信息。 其实,这个问题的主要原因是,应用中数
jetty服务器java.sql.SQLException: Already closed处理
在jetty的数据源配置中添加如下配置 true true true select 1 from dual 分别是添加了连接池取出,返回,和空闲时是否测试连接的有效性。 其中validationQuery的测试连接有效性的sql配置需要根据数据库进行调整。 最终配置如下: oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:
tomcat dbcp 基于jndi配置时出现java.sql.SQLException: Already closed
tomcat dbcp 基于jndi配置时出现java.sql.SQLException: Already <em>closed</em>
记一次Spring refresh context引发Data source is closed异常的坑
背景:Spring的profile写在了自定义配置文件中,需要手动读取配置文件,手动激活profile,关于激活profile的方法参考Spring激活profile的几种方式,我们采用了方案2。程序是首先初始化Spring上下文,建立连接池和事务管理器等等,然后读取配置文件,获取profile并激活,最后刷新上下文。如果在初始化上下文和刷新上下文之间有数据库操作的话,刷新上下文成功之后,这些操...
python中使用mysql 报错:pymysql.err.InterfaceError: (0, '')的解决办法
后台服务在运行时发现一个问题,运行约15分钟后,接口请求<em>报错</em> pymysql.err.InterfaceError: (0, '') 这个错误<em>提示</em>一般发生在将None赋给多个值,定位问题时发现 pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query') 如何解决这个问题呢 出现问...
程序为什么总提示:java.net.SocketException: socket closed
import java.net.*;rnimport java.io.*;rnrnpublic class MyClientrnrn public static void main (String[] args)rn rn if (args.length < 2)rn rn System.out.println ("Usage: MyClient IP Port");rn return;rn rn rn int nPort = new Integer(args[1]).intValue();rn if (nPort > 0)rn rn tryrn rn Socket client = new Socket (args[0], nPort);rn BufferedOutputStream outStream= rn new BufferedOutputStream (client.getOutputStream());rn BufferedInputStream inStream = rn new BufferedInputStream (client.getInputStream());rn rn String str = "hello";rn outStream.<em>write</em> (str.getBytes());rn outStream.close();rn rn int nBytes = inStream.read();rn byte[] buffer = new byte[nBytes+1];rn inStream.read (buffer, 0, nBytes);rn System.out.println (buffer + "Size:" + nBytes);rn inStream.close();rnrn //client.close();rn rn catch (Exception e)rn rn System.out.println (e);rn rn rn rn
Connection reset by peer: socket write error!!!
[color=#FF0000]为帮助保护您的安全,Internet Explorer已经阻止从此站点下载文件到您的计算机。点击此处查看选项....[/color]rn为什么会出现这个问题啊???如何解决。。。?rnrn[code=Java]ClientAbortException: java.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)rn at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)rn at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)rn at org.apache.tools.zip.ZipOutputStream.flush(ZipOutputStream.java:508)rn at com.estar.web.mon.ExportAllAction.getZip(ExportAllAction.java:180)rn at com.estar.web.mon.ExportAllAction.handgetzip(ExportAllAction.java:120)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:440)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.<em>spring</em>framework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn at org.<em>spring</em>framework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.<em>spring</em>framework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)rn at org.<em>spring</em>framework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)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:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)rn at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:299)rn at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:964)rn at org.apache.coyote.Response.action(Response.java:183)rn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)rn ... 78 morern[/code]
socket write error (code=10053)?请教
请问??rn我在往服务器端传送消息时出现以下错误!rnjava.net.SocketException: <em>socket</em> <em>write</em> <em>error</em> (code=10053)rn我的代码如下:rnjava.net.Socket serverSock=new java.net.Socket(strHostName ,iPort);rnjava.io.DataOutputStream outStream=new java.io.DataOutputStream(serverSock.getOutputStream());rnoutStream.<em>write</em>UTF(str);rn并且serverSock的变量正确 rn rn
请问这是什么错 socket write error
1、StandardWrapperValve[default]: Servlet.service() for servlet default threw exceptionrnjava.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rnrn2、java.lang.IllegalArgumentException: Document base X:\js\jisheng does not exist or is not a readable directoryrnrn3、2004-12-16 14:43:14 StandardContext[/jisheng]: Context startup failed due to previous <em>error</em>srn2004-12-16 14:43:14 StandardContext[/jisheng]: Exception during cleanup after start failedrnLifecycleException: Container StandardContext[/jisheng] has not been startedrn at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3644)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:3622)rnrn这个是我从日志里拷贝下来的。请哪位高手指点一下到底是什么错误。在下先谢谢了。rnConnection reset by peer: <em>socket</em> <em>write</em> <em>error</em> 如何解决这个问题?
Connection reset by peer: socket write error
我做的一个下载功能,可以正常下载文件,可是多次单击下载链接,后台就报这种bug 是怎么回事!求高手指教rnrnrnClientAbortException: java.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:369)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>Bytes(OutputBuffer.java:392)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>(OutputBuffer.java:381)rn at org.apache.catalina.connector.CoyoteOutputStream.<em>write</em>(CoyoteOutputStream.java:89)rn at FileName.DownFileBean.setFileName(DownFileBean.java:40)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 org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(JspRuntimeLibrary.java:665)rn at org.apache.jsp.down_jsp._jspService(down_jsp.java:96)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)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:127)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:291)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)
hibernate异常 Session was already closed
org.hibernate.SessionException: Session was <em>already</em> <em>closed</em>
Spring Boot配置数据库连接池
1.往application.properties添加内容#connection pool <em>spring</em>.datasource.max-idle=10 <em>spring</em>.datasource.max-wait=10000 <em>spring</em>.datasource.min-idle=5 <em>spring</em>.datasource.initial-size=5 <em>spring</em>.datasource.validation-q
spring配置数据源 druid
<em>spring</em>配置数据源 druidmaven 依赖DataSourceConfigjdbc.properties测试 maven 依赖 &lt;properties&gt; &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt; &lt;maven.compiler.target&gt;1.8&lt;/maven.co...
奇怪的错误 com.alibaba.druid.pool.DruidDataSource
错误如下: 本地测试没<em>报错</em>(估计跑的不够久),,布到服务器上后,一直收到<em>报错</em>邮件,基本下面的错误。。。 ,貌似也不影响系统使用,,就是一直<em>报错</em>。 困扰好久了。。。求救大神《》《》! 2016-09-2
com.alibaba.druid.pool.DruidDataSource:close:1436 | {dataSource-1} closed
场景: linux系统下,Apach Tomcat启动时,报出这行错后,服务没有启动,也没有别的错误 服务启动时用ehcache来缓存数据字典,并且同时启动两个应用服务 解决办法: 更改数据库连接池的最大连接数量 maxPoolSize=20,我将20改为50后,可以正常启动tomcatl了,当然也可以改为100,根据自己的数据库连接需要! ...
Software caused connection abort: socket write error
网站后台报java.net.SocketException: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em>rnrn<em>报错</em>程序指向了 os.flush();rnrnrn[code=Java]rnpublic void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn String aFilePath = null; //要下载的文件路径rn String aFileName = null; //要下载的文件名rn response.setHeader("pragma","no-cache"); rn response.setHeader("cache-control","no-cache"); rn response.setDateHeader("Expires",0); rn rn request.setCharacterEncoding("GBK");rn tryrn rn rn String str = getServletContext().getRealPath("/");rn str = str.replaceAll("\\\\", "/");// 转换\为/;rn rn String temp_name = request.getParameter("name");//取文件实际路径和名称rn String title = request.getParameter("jc");//取下载文件的名称rn String temp_1 = temp_name.substring(temp_name.lastIndexOf("."));//取扩展名rn aFilePath = str; rn aFileName = temp_name.substring(temp_name.lastIndexOf("/")+1);rn //碰到title中有.的,取最后一个.的前面部分作为titlern if(title.lastIndexOf(".")!= -1)title = title.substring(0,title.lastIndexOf("."));rn rn rn rn String abc = title+temp_1;rn String newsName = java.net.URLDecoder.decode(abc,"GBK");rnrn response.setContentType("text/x-msdownload");rn //response.addHeader("Content-Disposition","attachment; filename=\"" + new String(abc.getBytes("GBK"),"utf-8") + "\"");rn response.addHeader("Content-Disposition","attachment; filename=\"" + new String(newsName.getBytes(),"ISO-8859-1") + "\"");rn java.io.OutputStream os = null;rn java.io.FileInputStream fis = null;rn try rn os = response.getOutputStream();rn fis = new java.io.FileInputStream(aFilePath + temp_name);rn byte[] b = new byte[1024];rn int j = 0;rn while ((j = fis.read(b)) > 0) rn os.<em>write</em>(b, 0, j);rn rn fis.close();rn os.flush();//<em>报错</em>信息指向了这行rn os.close();rn catch (Exception e) rn e.printStackTrace();rn rn ///rn rn rn catch(Throwable e)rn rn //log.<em>error</em>("FileDownload doGet() IO <em>error</em>!",e);rn rn rn rn[/code]rnrnrn每次出现问题都需要重启服务才能好用,过了一天再下载内容时变成0字节rnrnrn
java.net.SocketException: Connection reset by peer: socket write error
[size=18px]我用以下代码实现文件下载:[/size]rnrn[code]rnrnrnrnrn rn rn rn rn rn rn rnrn[/code]rn[size=18px]rn下载doc和txt格式的文件还可以,没有<em>报错</em>,可是下载ppt格式的文件他就报如下错误:[/size]rnrn[code=Java]rnjava.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(Unknown Source)rn at java.net.SocketOutputStream.<em>write</em>(Unknown Source)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>Bytes(OutputBuffer.java:392)rn at org.apache.catalina.connector.OutputBuffer.<em>write</em>(OutputBuffer.java:381)rn at org.apache.catalina.connector.CoyoteOutputStream.<em>write</em>(CoyoteOutputStream.java:89)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2083)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1796)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:874)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:376)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.jsp.mainViews.downloadAction_jsp._jspService(downloadAction_jsp.java:74)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Unknown Source)rn[/code]rnrn[size=18px]请问有谁知道原因的吗?[/size]
Connection reset by peer: socket write error什么原因
警告: Error sending end packetrnjava.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(Unknown Source)rn at java.net.SocketOutputStream.<em>write</em>(Unknown Source)rn at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)rn at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)rn at org.apache.jk.core.MsgContext.action(MsgContext.java:301)rn at org.apache.coyote.Response.action(Response.java:183)rn at org.apache.coyote.Response.finish(Response.java:305)rn at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)rn at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)rn at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)rn at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)rn at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)rn at java.lang.Thread.run(Unknown Source)rn2009-7-28 12:24:15 org.apache.jk.common.ChannelSocket processConnectionrn警告: processCallbacks status 2rn我是APACH整合TOMCAT的,我日志里几乎都是这个异常,是什么原因造成的啊!
求救 Connection reset by peer: socket write error
我在jboss上发布一个应用,其中一个页面有一些连接,点击后将回下载avi到本地播放,但是jboss会<em>报错</em>:rn13:47:10,453 ERROR [Engine] StandardWrapperValve[default]: Servlet.service() for servlet default threw exceptionrnjava.net.SocketException: Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rn at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffernr.doWrite(InternalOutputBuffer.java:668)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentitrnyOutputFilter.java:160)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBrnuffer.java:523)rn at org.apache.coyote.Response.doWrite(Response.java:524)rn at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.jarnva:384)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)rn at org.apache.coyote.tomcat4.OutputBuffer.<em>write</em>Bytes(OutputBuffer.java:4rn11)rn at org.apache.coyote.tomcat4.OutputBuffer.<em>write</em>(OutputBuffer.java:398)rn at org.apache.coyote.tomcat4.CoyoteOutputStream.<em>write</em>(CoyoteOutputStreamrn.java:110)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.rnjava:1996)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:rn1745)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServrnlet.java:1073)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.javarn:506)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVrnalve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVrnalve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurrnityMgrRealm.java:220)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValvern.java:246)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContairnnerStatsValve.java:76)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:rn2416)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jrnava:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatchernrValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jrnava:172)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecuritrnyAssociationValve.java:65)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:rn577)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValrnve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22rn3)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.javarn:601)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.procernssConnection(Http11Protocol.java:392)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.javarn:565)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPrnool.java:619)rn at java.lang.Thread.run(Thread.java:536)rnrn请教各位大虾如何解决这个问题.
关于Druid执行connection.close(),connection不回收问题
解决方法如下: DruidDataSource.discardConnection(conn);
druid-连接池源码分析
一 java 对数据库的支持 java.sql 包的支持,一般使用显示编程的方式。&amp;amp;nbsp; &amp;amp;nbsp;connection接口、statment接口、ResultSet接口、DriverManager类。 JDBC例子 &amp;amp;nbsp;Connection con = null; //表示数据库的连接对象&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;PreparedStatement pstmt .
关于druid数据连接池抛出的 connection holder is null 异常
文章转自 今天在一台配置很低的机器上运行批量更新的程序~~~     大概跑了三十分钟~~~这配置~~~这程序~~~     然后华丽丽的报异常了~~~     具体异常是这样的, ? 1 2 3 4 5 6 7 8 9 10 11 12 13
socket编程 —— 非阻塞socket
在上一篇文章 《<em>socket</em>编程——一个简单的例子》 http://blog.csdn.net/wind19/archive/2011/01/21/6156339.aspx 中写了一个简单的tcp <em>socket</em>通信程序,可以进行数据的交互,但有一个问题是这个程序是阻塞的,任何<em>socket</em>函数都要等返回后才能进行下一步动作,如果recv一直没有数据,那么就一直不会返回,整个进程就阻塞在那。所以我们要进行改造一下,让程序不再阻塞在那,而是在有数据到来的<em>时候</em>读一下数据,有数据要写的<em>时候</em>发送一下数据。
常见的socket出错总结
case ECONNREFUSED:  reason = REASON_NO_SUCH_PORT; break;      没有这个端口             case EAGAIN:        reason = REASON_RESOURCE_UNAVAILABLE; break; buff已满             case EPIPE:         reason
Connection reset by peer:socket write error
Connection reset by peer:<em>socket</em> <em>write</em> <em>error</em> rn报这样的异常是因为用户在发出一个请求之后,还未等待其响应又发出了另外一个请求所导致的,rn有没有办法避免这种异常的发生呢?
Software caused connection abort: socket write error?
package ok;rnrnimport java.net.*;rnimport java.io.*;rnrnpublic class Application1 rn public static void main(String args[]) rn try rn ServerSocket server = new ServerSocket(1991);rn Socket soc = server.accept();rn BufferedOutputStream output = new BufferedOutputStream(soc.rn getOutputStream());rn BufferedInputStream input = new BufferedInputStream(newrn FileInputStream(new File(rn "C:\\Documents and Settings\\Administrator\\My Documents\\1.bmp")));rn rn byte[] zijie=new byte[1024];rn rn while(input.read(zijie)>0)rn rn output.<em>write</em>(zijie);rn output.flush();rn rn rn input.close();rn output.close(); //把这个去掉就没错了rn rn soc.close();rn server.close();rnrn catch (Exception ex) rnrn System.out.println("有错误发生了!" + ex.getMessage());rn rnrn rnrnrnrn上面是我写的传图片的代码。 在运行的<em>时候</em>会报rnSoftware caused connection abort: <em>socket</em> <em>write</em> <em>error</em> 这个错误?rn可是如果把output.close();去掉后就不会有错了 事实上在我写的所有有关<em>socket</em>的代码中 只要把输出流一关 就会出错! 谁告诉我一下为什么? 谢谢回答!
socket write error,求大大help
在<em>spring</em>mvc中后台返回给前端一个json时报了这个,不知道如何下手了nnjava.net.SocketException: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em>n at java.net.SocketOutputStream.<em>socket</em>Write0(Native Method)n at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:92)n at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)n at weblogic.servlet.internal.ChunkOutput.<em>write</em>ChunkTransfer(ChunkOutput.java:568)n at weblogic.servlet.internal.ChunkOutput.<em>write</em>Chunks(ChunkOutput.java:539)n at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:427)n at weblogic.servlet.internal.ChunkOutputWrapper.flush(ChunkOutputWrapper.java:188)n at weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:121)n at org.<em>spring</em>framework.http.converter.AbstractHttpMessageConverter.<em>write</em>(AbstractHttpMessageConverter.java:180)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.<em>write</em>WithMessageConverters(AbstractMessageConverterMethodProcessor.java:138)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.<em>write</em>WithMessageConverters(AbstractMessageConverterMethodProcessor.java:80)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:129)n at org.<em>spring</em>framework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:69)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:115)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:647)n at org.<em>spring</em>framework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:603)n at org.<em>spring</em>framework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)n at org.<em>spring</em>framework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)n at org.<em>spring</em>framework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:859)n at org.<em>spring</em>framework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:883)n at org.<em>spring</em>framework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:792)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)n at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)n at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)n at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)n at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)n at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)n at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)n at org.<em>spring</em>framework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)n at org.<em>spring</em>framework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)n at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)n at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)n at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)n at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)n at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)n at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)n at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)n at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)n at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)n at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)n at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)n at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)n n n n n
数据库重新链接出错 socket write error
[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>rnrn一、当我的tomcat启动以后,如果数据库重启,tomcat的连接池就再也连接不到数据库了。。rn二、tomcat启动的<em>时候</em>,数据库处于<em>关闭</em>状态,tomcat启动以后,再打开数据库,tomcat可以连接到数据库,但是如果数据库<em>再次</em>重启,tomcat的连接池就再也连接不到数据库了。。rnrn这个问题我在网上搜索了一下,没有一个能解决的,实在是郁闷,谢谢大家能给予解决
重新分析connection reset by peer, socket write error错误原因
上次写《connection reset by peer, <em>socket</em> <em>write</em> <em>error</em>问题排查》已经过去大半年,当时把问题“敷衍”过去了。 但是此后每隔一段时间就会又想起来,baidu、google一番,可能也会再拉周围的人小讨论一下,然后无果而终。淡忘,想起,淡忘,又想起,挥之不去。 这个周末它又在脑海中浮现,这次总算理解了这个问题,答案就在一本买了很久的新书《HTTP权威指南》中。如...
Connection reset,Connection reset by peer,Software caused connection abort :socket write error
Connection reset,Connection reset by peer,Software caused connection abort :<em>socket</em> <em>write</em> <em>error</em>java.net.SocketException:Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>java.net.SocketException:Connecti
spring注解开发AnnotationConfigApplicationContext的使用
使用AnnotationConfigApplicationContext可以实现基于Java的配置类加载Spring的应用上下文.避免使用application.xml进行配置。在使用<em>spring</em>框架进行服务端开发时,个人感觉注解配置在便捷性,和操作上都优于是使用XML进行配置; 很简单的接口output public interface outPut {public void helloworl
Jmeter测试接口稳定性BUG:Software caused connection abort: recv failed 错误介绍
原文地址:http://www.bubuko.com/infodetail-901481.html 解决1: Software caused connection abort: recv failed  java.net.SocketException: Software caused connection abort: recv failed  at java.net.Soc
解决tomcat运行一段时间就报错Software caused connection abort: socket write error错误
问题:      服务端是基于ssh框架搭建,在启动服务器一段时间访问正常,然后几十分钟几个小时后没有用户访问,<em>再次</em>去访问服务端就会报这个错。 解决过程:      起初我以为是服务器为了节省资源“自动休眠”,然后开始百度找资料,修改了tomcat配置啥的,还是没有解决问题,还是会<em>报错</em>。又开始找找找,又以为是数据库连接问题(后面发现确实是这个问题),开始检查代码,因为hibernate对数据
关于socket write error 和Software caused connection abort: recv failed 错误
Software caused connection abort: recv failed  错误 @Override public void run() { // TODO Auto-generated method stub ObjectInputStream ois = null; ObjectOutputStream oos = null; try { ois =
java.sql.SQLException: Io 异常: Software caused connection abort: socket write error
java.sql.SQLException: Io 异常: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em>     今天写了一个广播程序,用java测试的<em>时候</em>没有什么问题,但是用flash的客户端测试点<em>时候</em>就报下面的错误,想了很长时间也找不出问题的原因。 原来是flash软件在测试的<em>时候</em>不像java客户端一样,每开启一个新的客户端连接
连接数据库的方法 oracel
oracle数据库的参考方法 可以看一下 还有mysql和sqlserver的
tomcat未正常关闭,再次加载项目的时候报错
rn严重: ClassNotFoundException while loading persisted sessions: java.lang.ClassNotFoundException: com.experience.common.db.po.timesshdb.Userrnjava.lang.ClassNotFoundException: com.experience.common.db.po.timesshdb.Userrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:274)rn at org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:74)rn at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)rn at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)rn at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)rn at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)rn at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)rn at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1619)rn at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1084)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:282)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:202)rn at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:489)rnrnrn十月 14, 2015 3:00:09 下午 org.apache.catalina.session.StandardManager startInternalrn严重: Exception loading sessions from persistent storagernjava.lang.ClassNotFoundException: com.experience.common.db.po.timesshdb.Userrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)rn at java.lang.Class.forName0(Native Method)rnrn十月 14, 2015 3:00:10 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\webapps\experience has finished in 2,087 msrn十月 14, 2015 3:00:10 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-apr-8080"]rn十月 14, 2015 3:00:10 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-apr-8009"]rn十月 14, 2015 3:00:10 下午 org.apache.catalina.startup.Catalina startrn信息: Server startup in 2225 msrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server version: Apache Tomcat/7.0.64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server built: Aug 19 2015 17:18:06 UTCrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server number: 7.0.64.0rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Name: Windows Server 2012rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Version: 6.2rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Architecture: amd64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Java Home: C:\Program Files\Java\jdk1.7.0_79\jrern十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: JVM Version: 1.7.0_79-b15rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: JVM Vendor: Oracle Corporationrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: CATALINA_BASE: C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: CATALINA_HOME: C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dcatalina.home=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Dcatalina.base=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64rn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.endorsed.dirs=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\endorsedrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.io.tmpdir=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\temprn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManagerrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\conf\logging.propertiesrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: exitrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Xms128mrn十月 14, 2015 3:02:06 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Xmx256mrn十月 14, 2015 3:02:06 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEventrnrn十月 14, 2015 3:02:08 下午 org.apache.catalina.core.StandardService startInternalrnrn信息: Starting ProtocolHandler ["http-apr-8080"]rn十月 14, 2015 3:02:10 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-apr-8009"]rn十月 14, 2015 3:02:10 下午 org.apache.catalina.startup.Catalina startrn信息: Server startup in 1975 msrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server version: Apache Tomcat/7.0.64rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server built: Aug 19 2015 17:18:06 UTCrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Server number: 7.0.64.0rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Name: Windows Server 2012rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: OS Version: 6.2rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Architecture: amd64rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Java Home: C:\Program Files\Java\jdk1.7.0_79\jrern十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: JVM Version: 1.7.0_79-b15rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrnk\apache-tomcat-7.0.64rn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.endorsed.dirs=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\endorsedrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.io.tmpdir=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\temprn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManagerrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\Desktop\Jdk\apache-tomcat-7.0.64\conf\logging.propertiesrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: exitrn十月 14, 2015 3:03:07 下午 org.apache.catalina.startup.VersionLoggerListener logrn信息: Command line argument: -Xms128mrnrn严重: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"]rnjava.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??rn at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:470)rn at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:651)rnrnrnrnrnrnjava.net.BindException: Address <em>already</em> in use: JVM_Bindrn at java.net.DualStackPlainSocketImpl.bind0(Native Method)rn at java.net.DualStackPlainSocketImpl.<em>socket</em>Bind(DualStackPlainSocketImpl.java:106)rn at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)rn at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)rnrnrnrnrnrn
报错:Asynchronous socket error 10061
简单的一段代码rnprocedure TForm1.Button1Click(Sender: TObject);rnbeginrn control.Socket.SendText('reboot');rnend;rnrnprocedure TForm1.FormCreate(Sender: TObject);rnbeginrn control.Open;//主控rnend;rn运行时<em>报错</em>,WHY??
dataGridView1控件使用在连接数据库时候报错
[code=C#] private void button1_Click(object sender, EventArgs e)rn rn tryrn rn DataTable dt = ds.Tables[0];rn sda.FillSchema(dt, SchemaType.Mapped);rn DataRow dr = dt.Rows.Find(textBox1.Text);rn dr["name"] = textBox2.Text.Trim();rn dr["tel"] = textBox3.Text.Trim();rn OleDbCommandBuilder odb = new OleDbCommandBuilder(sda);rn sda.Update(dt);rn rn catch (Exception err) ;rn rnrn private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)rn rn textBox1.Text = dataGridView1.SelectedCells[0].Value.ToString();rn textBox2.Text = dataGridView1.SelectedCells[1].Value.ToString();rn textBox3.Text = dataGridView1.SelectedCells[2].Value.ToString();rn textBox1.Enabled = false;rn rn [/code]rnrnrn当我点击控件dataGridView1中是数据 就是里面的一个小格子的<em>时候</em> 就会<em>报错</em>说:rnrn“索引超出范围。必须为非负值并小于集合大小。参数名: index”rnrn当我选择一行的<em>时候</em>却没什么问题rnrn请问大家这个怎么解决啊?rnrn谢谢!
Oracel No Data Found Error
小弟刚刚接触Oracel开发,目前遇到四个问题,请大虾帮帮忙。rn1.运行下面语句时PLSQL Developer报no data found的错误,请问如何解决:rndeclare rn i integer;rnbeginrn select registrykey into i from ISI_Registry where name='S';rnend;rnrn2.另外,小弟还有一个问题,为什么Oracle在if语句里面不能写select语句呢?比如rnif i is null thenrn select registrykey from ISI_Registryrnend if;rn就会报ora-06550:an into clause is expected in this select statement的错误。难道if里面只能写insert,update或是into语句?rnrn3.在oracle里面如何打印一个变量的值呢?比如我想打印变量i的值,在SQL Server里面只需要写print i; 或是 select i;rn就可以,但是<em>oracel</em>里面却不行。rnrnrn4.小弟初学oracle,请各位大虾推荐几本比较初级的书,先不要oracle配置管理或是优化方面的,只要介绍oracle语法或是sql的就可以。最好是chm的。谢谢
jmeter测试接口报错如下,但是服务器是正常的。请问是什么问题?
-
使用springcloud Fegin上传文件报错Could not write request: no suitable HttpMessageConverter found for request
一、问题简介 在<em>spring</em>cloud微服务中,需要用到feign去调用文件上传的服务,如通过fastdfs文件服务器上传文件: 1、fegin的接口配置(服务降级代码:略~) @FeignClient(value = "XXXXXXXX-XXXXX-PROVIDER", fallbackFactory = XxxxxxClientFallbackFactory.class) pub...
java.net.SocketException: Software caused connection abort: socket write error最简单的解决方法
java.net.SocketException: Software caused connection abort: <em>socket</em> <em>write</em> <em>error</em> 这里只是众多情形之一的解决方式,简单实用: 如果项目运行一直都正常,但不知道怎么就抽风了, 那么可以这样来解决: project -&amp;gt; clean -&amp;gt; 重启...
高分求解Tomcat异灵错误之socket write error
最近连续几天,我的站点每天早上访问时都无法正常响应,只有到服务器上手动重启tomcat才能正常访问,每天如此。查了几天的日志,发现每天的0:20分左右tomcat都会莫名其妙地报上这样的异常,之后就一
导出Socket write error
导出 <em>socket</em> <em>write</em> <em>error</em> outputStream输出流<em>报错</em> 前后端连接中断 后端还在运行 前端ifream移除太快
link error already defined?
我在a.h文件中定义了一个函数p1如下:rn//a.hrnvoid p1()rn......rnrn然后将a.h包含到b.cpp和c.cpp中编译链接,得到链接错误link <em>error</em>,p1 <em>already</em> defined in b.objrnrn请问该如何解决此问题?谢谢
java.net.SocketException: Socket closed 错误
public String httpPostNameValuePair(String url,Map URLParams)rn rn String returnString=null;rn DefaultHttpClient httpClient = new DefaultHttpClient(httpParams);rn httpClient.getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,true);rnrn List nvps=httpClientGetURLParams(URLParams);rn HttpPost httpPost=newNameValuePairHttpPost(url, nvps);rn HttpResponse response=httpClientExecute(httpClient,httpPost);//response.getFirstHeader("Location").getValue();rnrn //if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK)//判断是否正确执行(如果网页执行程序出问题,会返回500)rn rn tryrn rn returnString=EntityUtils.toString(response.getEntity());//InputStream is=response.getEntity().getContent();rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn httpClient.getConnectionManager().shutdown();rn return returnString;rn rnrnrn麻烦看上面函数,一直都运行好好的,怎么今天发现抛出下面错误: 麻烦看下,谢谢。rn07-09 17:20:57.476 6275-6502/com.logohoo.manstore.app W/System.err﹕ java.net.SocketException: Socket <em>closed</em>rn07-09 17:20:57.486 6275-6502/com.logohoo.manstore.app W/System.err﹕ at libcore.io.Posix.recvfromBytes(Native Method)rn07-09 17:20:57.486 6275-6502/com.logohoo.manstore.app W/System.err﹕ at libcore.io.Posix.recvfrom(Posix.java:131)rn07-09 17:20:57.496 6275-6502/com.logohoo.manstore.app W/System.err﹕ at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)rn07-09 17:20:57.496 6275-6502/com.logohoo.manstore.app W/System.err﹕ at libcore.io.IoBridge.recvfrom(IoBridge.java:513)rn07-09 17:20:57.496 6275-6502/com.logohoo.manstore.app W/System.err﹕ at java.net.PlainSocketImpl.read(PlainSocketImpl.java:489)rn07-09 17:20:57.496 6275-6502/com.logohoo.manstore.app W/System.err﹕ at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)rn07-09 17:20:57.506 6275-6502/com.logohoo.manstore.app W/System.err﹕ at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:241)rn07-09 17:20:57.506 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)rn07-09 17:20:57.506 6275-6275/com.logohoo.manstore.app I/Choreographer﹕ Skipped 796 frames! The application may be doing too much work on its main thread.rn07-09 17:20:57.516 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)rn07-09 17:20:57.516 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:174)rn07-09 17:20:57.516 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:159)rn07-09 17:20:57.516 6275-6502/com.logohoo.manstore.app W/System.err﹕ at java.io.InputStreamReader.read(InputStreamReader.java:244)rn07-09 17:20:57.526 6275-6502/com.logohoo.manstore.app W/System.err﹕ at java.io.Reader.read(Reader.java:145)rn07-09 17:20:57.526 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.util.EntityUtils.toString(EntityUtils.java:135)rn07-09 17:20:57.526 6275-6502/com.logohoo.manstore.app W/System.err﹕ at org.apache.http.util.EntityUtils.toString(EntityUtils.java:146)
关于java.net.SocketException: Socket closed
下面这段代码的---- out.<em>write</em>(buf, 0, len)报异常rnjava.net.SocketException: Socket <em>closed</em>rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:99)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>ChunkNoTransfer(ChunkOutput.java:548)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>Chunks(ChunkOutput.java:505)rn at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)rn at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>(ChunkOutput.java:304)rn at weblogic.servlet.internal.ChunkOutputWrapper.<em>write</em>(ChunkOutputWrapper.java:137)rn at weblogic.servlet.internal.ServletOutputStreamImpl.<em>write</em>(ServletOutputStreamImpl.java:168)rn at jp.co.nes.necle.common.util.ServletUtils.download(ServletUtils.java:126)rn at jp.co.nes.necle.common.util.ServletUtils.download(ServletUtils.java:97)rn at jp.co.nes.necle.goods.web.PublishingOutPutCSVAllAction.showPublishingOutPutCSVAll(PublishingOutPutCSVAllAction.java:535)rn at jp.co.nes.necle.goods.web.PublishingOutPutCSVAllAction.perform(PublishingOutPutCSVAllAction.java:83)rn at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)rn at jp.co.nes.necle.common.web.BasicActionServlet.process(BasicActionServlet.java:87)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)rn at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)rn at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)rn at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)rn at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(Unknown Source)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)rnjava.net.SocketException: Socket <em>closed</em>rn at java.net.SocketOutputStream.<em>socket</em>Write(SocketOutputStream.java:99)rn at java.net.SocketOutputStream.<em>write</em>(SocketOutputStream.java:136)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>ChunkNoTransfer(ChunkOutput.java:548)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>Chunks(ChunkOutput.java:505)rn at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)rn at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)rn at weblogic.servlet.internal.ChunkOutput.<em>write</em>(ChunkOutput.java:304)rn at weblogic.servlet.internal.ChunkOutputWrapper.<em>write</em>(ChunkOutputWrapper.java:137)rn at weblogic.servlet.internal.ServletOutputStreamImpl.<em>write</em>(ServletOutputStreamImpl.java:168)rn at jp.co.nes.necle.common.util.ServletUtils.download(ServletUtils.java:126)rn at jp.co.nes.necle.common.util.ServletUtils.download(ServletUtils.java:97)rn at jp.co.nes.necle.goods.web.PublishingOutPutCSVAllAction.showPublishingOutPutCSVAll(PublishingOutPutCSVAllAction.java:535)rn at jp.co.nes.necle.goods.web.PublishingOutPutCSVAllAction.perform(PublishingOutPutCSVAllAction.java:83)rn at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)rn at jp.co.nes.necle.common.web.BasicActionServlet.process(BasicActionServlet.java:87)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)rn at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)rn at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)rn at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)rn at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3370)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(Unknown Source)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)rn不知道什么原因,希望各位高手解答rn代码:rn private static void download(HttpServletResponse response,rn InputStream in, int contentLength, String fileName)rn throws IOException rn response.reset();rn response.setContentLength(contentLength);rn response.setContentType("application/octet-stream");rn response.setHeader("Content-Disposition",rn "attachment; filename=\"" + fileName + "\"");rn OutputStream out = null;rn try rn out = response.getOutputStream();rn byte[] buf = new byte[512];rn int len;rn while ((len = in.read(buf)) != -1) rn ---- out.<em>write</em>(buf, 0, len);rn rn catch (Exception e) rn e.printStackTrace();rn finally rn try rn in.close();rn catch (IOException e) rn e.printStackTrace();rn rn if (out != null) rn try rn out.close();rn catch (IOException e) rn e.printStackTrace();rn rn rn rn
java socket 长连接 Connection reset by peer: socket write error 问题
public class SocketUtil rn private static Logger logger = Logger.getLogger(SocketUtil.class);rn private static Socket <em>socket</em> = new Socket();rn private static OutputStream os = null;rn private static BufferedWriter bw = null;rn private static SocketAddress endpoint = new InetSocketAddress("131.252.83.51",30010);rn public static void getConnection() throws Exception rn //判断连接是否通畅,如果连接不通则重新连接rn int i = 0;rn while(!(<em>socket</em>.isConnected() && !<em>socket</em>.isClosed()))rn i++;rn tryrn <em>socket</em> = new Socket();rn <em>socket</em>.connect(endpoint,15*1000);rn os = <em>socket</em>.getOutputStream();rn catch(Exception e)rn try rn <em>socket</em>.close();rn // 60秒以后重新发起连接;rn// Thread.sleep(60000);rn Thread.sleep(5000);rn catch (IOException e1) rn rn logger.<em>error</em>(e, e);rn rn if(i>=5)rn throw new BizException("连接失败,本次发起连接次数:"+i);rn rn rn rn rn public static void sendMsg() throws Exception rn //判断是否需要连接,如果需要则发起连接rn SocketUtil.getConnection();rn // 组装报文字符串;rn String sendMsg = CTBRechargeRequestXml.toXML();rn try rn System.out.println(<em>socket</em>.toString());rn bw = new BufferedWriter(new OutputStreamWriter(os, "gb2312"));rn bw.<em>write</em>(sendMsg);rn bw.flush();rn// logger.debug("发送报文:[" + sendMsg + "]");rn catch (Exception e) rn e.printStackTrace();rn try rn <em>socket</em>.close();rn bw.close();rn SocketUtil.sendMsg();rn catch (IOException e1) rn rn logger.<em>error</em>(e, e);rn throw new BizException("发送报文失败:" + e.getMessage());rn rn rn public static String recvMsg() throws BizException rn try rn <em>socket</em>.setSoTimeout(10000);rn System.out.println(<em>socket</em>.toString());rn InputStream is = <em>socket</em>.getInputStream();rn DataInputStream dis = new DataInputStream(is);rn int n=0;rn ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 64);rn byte[] buf = new byte[1024 * 64]; rn while ((n = dis.read(buf)) >= 0)rn rn baos.<em>write</em>(buf, 0, n);rn rn byte[] respContent = baos.toByteArray();rn String repMsg = new String(respContent,"GB2312");rn return repMsg;rn catch (Exception e) rn logger.<em>error</em>("接收报文出错:" + e.getMessage());rn e.printStackTrace();rn throw new BizException("接收报文出错:" + e.getMessage());rn rn rn rn public static void sendRecv() throws Exception rn //发送报文rn SocketUtil.sendMsg();rn //接收报文rn String repMsg = SocketUtil.recvMsg();rn //解析接收到的报文并入库rn ResolverResponse.resolverSaveXml(repMsg);rn rn说明一下:这个是java长连接发送<em>socket</em>报文, 问什么我每次启动服务 第一次发送报文的<em>时候</em>都会<em>报错</em>,接收报文出错:Connection reset 当我<em>再次</em>发送报文的<em>时候</em>就报:发送报文失败:Connection reset by peer: <em>socket</em> <em>write</em> <em>error</em>的错误。求高手指教
spring没有提示时候
<em>spring</em>没有<em>提示</em>的<em>时候</em><em>spring</em>没有<em>提示</em>的<em>时候</em><em>spring</em>没有<em>提示</em>的<em>时候</em><em>spring</em>没有<em>提示</em>的<em>时候</em><em>spring</em>没有<em>提示</em>的<em>时候</em><em>spring</em>没有<em>提示</em>的<em>时候</em>
易我数据恢复向导 一个好用的数据恢复软件下载
易我数据恢复向导 一个好用的数据恢复软件。这个软件我用过了,在家都来试试吧, 相关下载链接:[url=//download.csdn.net/download/haiancaoyong/2241112?utm_source=bbsseo]//download.csdn.net/download/haiancaoyong/2241112?utm_source=bbsseo[/url]
学生选课管理系统下载
该资源里面包含有数据库,ER图等 挺不错的 下载吧 亲 记得给好评哦!! 相关下载链接:[url=//download.csdn.net/download/j705865774/3994292?utm_source=bbsseo]//download.csdn.net/download/j705865774/3994292?utm_source=bbsseo[/url]
efcd 模型的应用下载
介绍环境流体动力学模型及其应用,对于模型初学者有一定的帮助作用。 相关下载链接:[url=//download.csdn.net/download/lindar_789/8106023?utm_source=bbsseo]//download.csdn.net/download/lindar_789/8106023?utm_source=bbsseo[/url]
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件
我们是很有底线的