2011-03-29 17 views
0

次のエラーが発生しています。Hibernate Mysql CommunicationsException MESSAGE:通信リンクの失敗サーバに送信された最後のパケットは、47 ms前に

実際に私は私のWeb app.Nextを通して私のデータベーステーブルの1つに現在の日付を設定しています。私は自分のテーブルに他の日付を入力したいのですが、システムの日付を変更しようとしました。アプリはデータベース関連の操作を行うことができません。私は次のエラーに直面しています。

私は、NetBeans 6.8を使用しています

、Mysqlconnector 5.1.7、Hibernate3の

私はこのためのソリューションを必要としています。私は私のWebアプリケーションで次のエラーを取得するシステム時刻を変更するとき

org.hibernate.exception.JDBCConnectionException: could not execute query 
     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) 
     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
     at org.hibernate.loader.Loader.doList(Loader.java:2223) 
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) 
     at org.hibernate.loader.Loader.list(Loader.java:2099) 
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) 
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) 
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) 
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
     at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) 
     at org.bluewhale.dao.HibernateDao.checkLogin(HibernateDao.java:340) 
     at org.apache.jsp.LoginProcess_jsp._jspService(LoginProcess_jsp.java:63) 
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: 

**は** **

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException 
MESSAGE: Communications link failure 

Last packet sent to the server was 47 ms ago. 

STACKTRACE: 

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 

Last packet sent to the server was 47 ms ago. 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) 
     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895) 
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438) 
     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) 
     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) 
     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) 
     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) 
     at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912) 
     at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) 
     at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) 
     at org.hibernate.loader.Loader.doQuery(Loader.java:674) 
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) 
     at org.hibernate.loader.Loader.doList(Loader.java:2220) 
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) 
     at org.hibernate.loader.Loader.list(Loader.java:2099) 
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) 
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) 
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) 
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
     at org.bluewhale.dao.HibernateDao.getClients(HibernateDao.java:105) 
     at org.apache.jsp.SalesGrid_jsp._jspService(SalesGrid_jsp.java:74) 
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) 
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) 
     at java.lang.Thread.run(Thread.java:619) 
Caused by: java.net.SocketException: Software caused connection abort: recv failed 
     at java.net.SocketInputStream.socketRead0(Native Method) 
     at java.net.SocketInputStream.read(SocketInputStream.java:129) 
     at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) 
     at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) 
     at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) 
     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2452) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906) 
     ... 42 more 


** END NESTED EXCEPTION ** 


     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) 
     at com.mysql.jdbc.Util.getInstance(Util.java:381) 
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984) 
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) 
     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) 
     at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1115) 
     at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4111) 
     at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4077) 
     at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505) 
     at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423) 
     at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) 
     at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) 
     at org.hibernate.loader.Loader.doQuery(Loader.java:673) 
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) 
     at org.hibernate.loader.Loader.doList(Loader.java:2220) 
     ... 31 more 
username11 
org.hibernate.exception.JDBCConnectionException: could not execute query 
     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74) 
     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) 
     at org.hibernate.loader.Loader.doList(Loader.java:2223) 
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) 
     at org.hibernate.loader.Loader.list(Loader.java:2099) 
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) 
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) 
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) 
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
     at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) 
     at org.bluewhale.dao.HibernateDao.checkLogin(HibernateDao.java:340) 
     at org.apache.jsp.LoginProcess_jsp._jspService(LoginProcess_jsp.java:63) 
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) 
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) 
     at java.lang.Thread.run(Thread.java:619) 
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: 


** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException 
MESSAGE: Communications link failure 

Last packet sent to the server was 47 ms ago. 

STACKTRACE: 

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 

Last packet sent to the server was 47 ms ago. 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) 
     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895) 
     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438) 
     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) 
     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) 
     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) 
     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) 
     at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912) 
     at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) 
     at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) 
     at org.hibernate.loader.Loader.doQuery(Loader.java:674) 
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) 
     at org.hibernate.loader.Loader.doList(Loader.java:2220) 
     at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) 
     at org.hibernate.loader.Loader.list(Loader.java:2099) 
     at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) 
     at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) 
     at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) 
     at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) 
     at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
     at org.bluewhale.dao.HibernateDao.getClients(HibernateDao.java:105) 
     at org.apache.jsp.SalesGrid_jsp._jspService(SalesGrid_jsp.java:74) 
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) 
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) 
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) 
     at java.lang.Thread.run(Thread.java:619) 
Caused by: java.net.SocketException: Software caused connection abort: recv failed 
     at java.net.SocketInputStream.socketRead0(Native Method) 
     at java.net.SocketInputStream.read(SocketInputStream.java:129) 
     at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) 
     at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) 
     at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) 
     at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2452) 
     at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906) 
     ... 42 more 

** END入れ子の例外を入れ子の例外をBEGIN

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) 
    at com.mysql.jdbc.Util.getInstance(Util.java:381) 
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984) 
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) 
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) 
    at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1115) 
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4111) 
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4077) 
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505) 
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423) 
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) 
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) 
    at org.hibernate.loader.Loader.doQuery(Loader.java:673) 
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) 
    at org.hibernate.loader.Loader.doList(Loader.java:2220) 
    ... 31 more 

答えて

0

接続プールの属性、testOnBorrow、testOnReturn、testOnIdleなどの属性を設定しますあなたは完全に役に立たないと思ったかもしれません。彼らは理由のためにそこに与えられます。接続プールのドキュメントを注意深く読んでください。私はあなたがしなかったと思う。接続プールを使用していない場合は、接続プールを使用する必要があります。

関連する問題