2013-10-01 107 views
0
HTTP Status 500 - An exception occurred processing JSP page /xxxxxxx/Complete.jsp at line 51 

type Exception report 

message An exception occurred processing JSP page /xxxxxxx/Complete.jsp at line 51 

description The server encountered an internal error that prevented it from fulfilling this request. 

exception 

org.apache.jasper.JasperException: An exception occurred processing JSP page /TOS0913_147592/Complete.jsp at line 51 

48:    
49:   us.setDate(Util.getIndianDate()); 
50:   us.setTime(Util.getIndianTime()); 
51:   UserSurveyDetailsDao.saveuser(us); 
52:    
53: %> 
54: 


Stacktrace: 
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
root cause 

org.hibernate.exception.JDBCConnectionException: could not execute statement 
    org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:132) 
    org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) 
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) 
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) 
    org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136) 
    org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96) 
    org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2975) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3487) 
    org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) 
    org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) 
    org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:214) 
    org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:194) 
    org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:178) 
    org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:321) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192) 
    org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:206) 
    org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:191) 
    org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90) 
    org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:764) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:756) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:752) 
    com.SurveyWithoutVendor.Dao.UserSurveyDetailsDao.saveuser(UserSurveyDetailsDao.java:14) 
    org.apache.jsp.TOS0913_005f147592.Complete_jsp._jspService(Complete_jsp.java:115) 
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
root cause 

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

The last packet successfully received from the server was 430,396 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. 
    sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
    java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
    com.mysql.jdbc.Util.handleNewInstance(Util.java:411) 
    com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) 
    com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3102) 
    com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2991) 
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3532) 
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002) 
    com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163) 
    com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624) 
    com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330) 
    org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133) 
    org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96) 
    org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2975) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3487) 
    org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) 
    org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) 
    org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:214) 
    org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:194) 
    org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:178) 
    org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:321) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192) 
    org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:206) 
    org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:191) 
    org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90) 
    org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:764) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:756) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:752) 
    com.SurveyWithoutVendor.Dao.UserSurveyDetailsDao.saveuser(UserSurveyDetailsDao.java:14) 
    org.apache.jsp.TOS0913_005f147592.Complete_jsp._jspService(Complete_jsp.java:115) 
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
root cause 

java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. 
    com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2552) 
    com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3002) 
    com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2991) 
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3532) 
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002) 
    com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163) 
    com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624) 
    com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345) 
    com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330) 
    org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133) 
    org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:96) 
    org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:58) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2975) 
    org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3487) 
    org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) 
    org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) 
    org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:214) 
    org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:194) 
    org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:178) 
    org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:321) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:286) 
    org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:192) 
    org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:206) 
    org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:191) 
    org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49) 
    org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90) 
    org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:764) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:756) 
    org.hibernate.internal.SessionImpl.save(SessionImpl.java:752) 
    com.SurveyWithoutVendor.Dao.UserSurveyDetailsDao.saveuser(UserSurveyDetailsDao.java:14) 
    org.apache.jsp.TOS0913_005f147592.Complete_jsp._jspService(Complete_jsp.java:115) 
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) 
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728) 
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.39 logs. 

此錯誤很少發生。如果我再次刷新頁面,我沒有發現任何錯誤。HTTP狀態500 - 處理JSP頁面發生異常(休眠)

+0

你不應該在同一個文件中混用dao,jsp等。 – Alex

+0

爲什麼我們不應該混合? – SKR

+0

不是很好的做法。 – Alex

回答

0

此錯誤只能通過修復Web服務器軟件來解決。這不是客戶端問題。 Web服務器站點的運營商應該定位和分析日誌,以提供有關錯誤的更多信息。 或 不要把src文件夾放在WEB-INF目錄下!

0

似乎有你的應用服務器和數據庫服務器之間的連接問題(你的數據庫服務器不是由應用服務器可達):

Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. 

Communications link failure. 

The last packet successfully received from the server was 430,396 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. 

看看this發佈有關如何解決此問題的更多信息。

相關問題