java.lang.Error

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We have seen many instances of bug reports containing similar error as follows: The random connection closed exception is documented with suggested code pattern from tomcat doc: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Random_Connection_Closed_Exceptions which I suggest we should do a code review across all Sakai code that uses db connection, and make sure the code never closes a connection twice. "stack trace: java.lang.Error: java.sql.SQLException: Already closed. at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:620) caused by: java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181) at org.sakaiproject.db.impl.BasicSqlService.returnConnection(BasicSqlService.java:276) at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:620) at org.sakaiproject.util.BaseDbFlatStorage.getResource(BaseDbFlatStorage.java:340) at org.sakaiproject.util.BaseDbFlatStorage.getResource(BaseDbFlatStorage.java:320) at org.sakaiproject.site.impl.DbSiteService$DbStorage.get(DbSiteService.java:237) at org.sakaiproject.site.impl.BaseSiteService.getDefinedSite(BaseSiteService.java:586) at org.sakaiproject.site.impl.BaseSiteService.getSite(BaseSiteService.java:672) at org.sakaiproject.site.impl.BaseSiteService.getSiteVisit(BaseSiteService.java:750) at org.sakaiproject.site.cover.SiteService.getSiteVisit(SiteService.java:134) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getSiteVisit(PortalSiteHelperImpl.java:896) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getMyWorkspace(PortalSiteHelperImpl.java:698) at org.sakaiproject.portal.charon.site.AbstractSiteViewImpl.<init>(AbstractSiteViewImpl.java:99) at org.sakaiproject.portal.charon.site.SubSiteViewImpl.<init>(SubSiteViewImpl.java:58) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getSitesView(PortalSiteHelperImpl.java:1135) at org.sakaiproject.portal.charon.SkinnableCharonPortal.includeSubSites(SkinnableCharonPortal.java:415) at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:263) at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:125) at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:581) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) "
    via by Zhen Qian,
  • We have seen many instances of bug reports containing similar error as follows: The random connection closed exception is documented with suggested code pattern from tomcat doc: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Random_Connection_Closed_Exceptions which I suggest we should do a code review across all Sakai code that uses db connection, and make sure the code never closes a connection twice. "stack trace: java.lang.Error: java.sql.SQLException: Already closed. at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:620) caused by: java.sql.SQLException: Already closed. at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:84) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181) at org.sakaiproject.db.impl.BasicSqlService.returnConnection(BasicSqlService.java:276) at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:620) at org.sakaiproject.util.BaseDbFlatStorage.getResource(BaseDbFlatStorage.java:340) at org.sakaiproject.util.BaseDbFlatStorage.getResource(BaseDbFlatStorage.java:320) at org.sakaiproject.site.impl.DbSiteService$DbStorage.get(DbSiteService.java:237) at org.sakaiproject.site.impl.BaseSiteService.getDefinedSite(BaseSiteService.java:586) at org.sakaiproject.site.impl.BaseSiteService.getSite(BaseSiteService.java:672) at org.sakaiproject.site.impl.BaseSiteService.getSiteVisit(BaseSiteService.java:750) at org.sakaiproject.site.cover.SiteService.getSiteVisit(SiteService.java:134) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getSiteVisit(PortalSiteHelperImpl.java:896) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getMyWorkspace(PortalSiteHelperImpl.java:698) at org.sakaiproject.portal.charon.site.AbstractSiteViewImpl.<init>(AbstractSiteViewImpl.java:99) at org.sakaiproject.portal.charon.site.SubSiteViewImpl.<init>(SubSiteViewImpl.java:58) at org.sakaiproject.portal.charon.site.PortalSiteHelperImpl.getSitesView(PortalSiteHelperImpl.java:1135) at org.sakaiproject.portal.charon.SkinnableCharonPortal.includeSubSites(SkinnableCharonPortal.java:415) at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:263) at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:125) at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:581) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:662) "
    via by Zhen Qian,
    • java.lang.Error: java.sql.SQLException: Already closed. at org.sakaiproject.db.impl.BasicSqlService.dbRead(BasicSqlService.java:620)
    No Bugmate found.