0 Replies Latest reply on May 4, 2010 10:49 AM by valerio de minico

    seam and a strange mysql exception...

    valerio de minico Newbie

      Hi,
      I have a strange com.mysql.jdbc.CommunicationException. The scenario is not deterministic, the exception is raised after a period of inactivity. This is the exception stack trace:



      10:02:25,334 INFO  [Contexts] starting up: org.jboss.seam.security.identity
      10:02:25,334 WARN  [RuleBasedIdentity] no security rule base available - please install a RuleBase with the name 'securityRules' if permission checks are required.
      10:02:25,334 INFO  [Contexts] starting up: org.jboss.seam.web.session
      10:02:25,340 ERROR [JDBCTransaction] JDBC begin failed
      com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 
      
      ** BEGIN NESTED EXCEPTION ** 
      
      java.net.SocketException
      MESSAGE: Broken pipe
      
      STACKTRACE:
      
      java.net.SocketException: Broken pipe
           at java.net.SocketOutputStream.socketWrite0(Native Method)
           at java.net.SocketOutputStream.socketWrite(Unknown Source)
           at java.net.SocketOutputStream.write(Unknown Source)
           at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
           at java.io.BufferedOutputStream.flush(Unknown Source)
           at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
           at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
           at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
           at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5442)
           at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
           at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
           at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
           at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
           at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
           at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)
           at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:323)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
           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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           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:298)
           at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
           at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
           at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
           at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
           at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
           at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
           at java.lang.Thread.run(Unknown Source)
      
      
      ** END NESTED EXCEPTION **
      
      
      
      Last packet sent to the server was 1 ms ago.
           at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
           at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
           at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
           at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5442)
           at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
           at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
           at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
           at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
           at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
           at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)
           at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:323)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
           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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           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:298)
           at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
           at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
           at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
           at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
           at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
           at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
           at java.lang.Thread.run(Unknown Source)
      10:02:25,341 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: Could not start transaction
           at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:592)
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:323)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
           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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           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:298)
           at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
           at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
           at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
           at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
           at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
           at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
           at java.lang.Thread.run(Unknown Source)
      Caused by: javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
           at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
           at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
           at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)
           at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)
           ... 68 more
      Caused by: org.hibernate.TransactionException: JDBC begin failed: 
           at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:68)
           at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
           at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
           ... 70 more
      Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 
      
      ** BEGIN NESTED EXCEPTION ** 
      
      java.net.SocketException
      MESSAGE: Broken pipe
      
      STACKTRACE:
      
      java.net.SocketException: Broken pipe
           at java.net.SocketOutputStream.socketWrite0(Native Method)
           at java.net.SocketOutputStream.socketWrite(Unknown Source)
           at java.net.SocketOutputStream.write(Unknown Source)
           at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
           at java.io.BufferedOutputStream.flush(Unknown Source)
           at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
           at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
           at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
           at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5442)
           at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
           at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
           at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
           at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
           at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
           at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:82)
           at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:323)
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
           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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           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:298)
           at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
           at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
           at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
           at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
           at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
           at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
           at java.lang.Thread.run(Unknown Source)
      
      
      ** END NESTED EXCEPTION **
      
      
      
      Last packet sent to the server was 1 ms ago.
           at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
           at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
           at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
           at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)
           at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5442)
           at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)
           at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)
           at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)
           ... 72 more
      



      Here is the component.xml:



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
       xmlns:core="http://jboss.com/products/seam/core"
       xmlns:drools="http://jboss.com/products/seam/drools"
       xmlns:mail="http://jboss.com/products/seam/mail"
       xmlns:persistence="http://jboss.com/products/seam/persistence"
       xmlns:security="http://jboss.com/products/seam/security"
       xmlns:transaction="http://jboss.com/products/seam/transaction"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd                   http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd                   http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd                  http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd                   http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd                  http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd                  http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd                  http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
       
       <core:init debug="true" jndi-pattern="@jndiPattern@"/>
       
       <core:manager concurrent-request-timeout="5000"
        conversation-id-parameter="cid" conversation-timeout="120000" parent-conversation-id-parameter="pid"/>
       
       <persistence:managed-persistence-context auto-create="true"
        entity-manager-factory="#{bbpoint_siteEntityManagerFactory}" name="entityManager"/>
       
       <persistence:entity-manager-factory
        name="bbpoint_siteEntityManagerFactory" persistence-unit-name="bbhostels_registration"/>
       
       <transaction:entity-transaction entity-manager="#{entityManager}"/>
        
       <component name="initializer" class="com.bbpoint.core.init.Initializer">
            <property name="applicationName">bbpoint_site</property>
       </component>
        
       
      </components>
      



      where the persistence-unit is defined in a separate jar and use a context-scope datasource. There are three webapps deployed on the tomcat server 6.0.20 and all these webapps use the same jar deployed under their own WEB-INF/lib directory.


      What could be the problem??? It seems related to the mysql jdbc driver, but it happens only on one of the three deployed webapps...


      Thanks,
      Valerio.