Announcement Announcement Module
Collapse
No announcement yet.
500 Error, TransactionException: JDBC begin failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 500 Error, TransactionException: JDBC begin failed

    I have a problem very similar to this one.
    http://blog.jackcrews.net/2009/12/mi...exception.html

    Every day with the first request I get an 500 error in my application after sending the login:

    Code:
    org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; 
    nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
            org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382)
           org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(
    When you click reload or close the browser and and try it again the application works.
    That error occurs only once a day at the first request.

    The application is based on hibernate, JPA, Spring Action Script, and Spring security for the login.


    The persistence.xml looks like that:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
    	xmlns:jee="http://www.springframework.org/schema/jee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/jee
           http://www.springframework.org/schema/jee/spring-jee.xsd">
    
    	<bean id="propertyPlaceholder"
    		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    		<property name="locations">
    			<list>
    				<value>WEB-INF/config/db.properties</value>
    				<value>WEB-INF/config/MySQL_dynamicTime.properties</value>
    			</list>
    		</property>
    	</bean>
    
    	<bean id="dataSource"
    		class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    		<property name="driverClassName" value="${db.driver}" />
    		<property name="url" value="${db.url}" />
    		<property name="username" value="${db.username}" />
    		<property name="password" value="${db.password}" />
    		<property name="maxActive" value="${db.maxActive}" />
    		<property name="maxIdle" value="${db.maxIdle}" />
    	</bean>
    	<bean id="martDataSource"
    		class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    		<property name="driverClassName" value="${mart.db.driver}" />
    		<property name="url" value="${mart.db.url}" />
    		<property name="username" value="${mart.db.username}" />
    		<property name="password" value="${mart.db.password}" />
    		<property name="maxActive" value="${mart.db.maxActive}" />
    		<property name="maxIdle" value="${mart.db.maxIdle}" />		
    	</bean>
    
    	<bean id="entityManagerFactory"
    		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    		<property name="dataSource" ref="dataSource" />
    
    		<property name="jpaVendorAdapter">
    			<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    				<property name="showSql" value="true" />
    				<property name="generateDdl" value="true" />
    				<property name="database" value="${db.dialect}" />
    			</bean>
    		</property>
    
    		<property name="persistenceUnitName" value="eanalyticsPersistence" />
    
    		<property name="jpaDialect">
    			<bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
    		</property>
    
    		<property name="jpaProperties">
    			<props>
    				<prop key="hibernate.hbm2ddl.auto">${db.hibernate.hbm2ddl.auto}</prop>
    			</props>
    		</property>
    
    	</bean>
    
    	<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    		<property name="entityManagerFactory" ref="entityManagerFactory" />
    	</bean>
    
    	<tx:annotation-driven transaction-manager="transactionManager" />
    
    	<context:annotation-config />
    
    </beans>
    As I'm using Spring Action Script the application context contains only Spring Action Script Stuff and the used services.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <objects xmlns="http://www.springactionscript.org/schema/objects"
    		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		 xsi:schemaLocation="http://www.springactionscript.org/schema/objects
    					http://www.springactionscript.org/schema/objects/spring-actionscript-objects-1.0.xsd">
    
    	<!-- - Spring ActionScript config do not remove the two objects, they are
    		needed by SpringActionscript -->
    	<object id="defaultAutowiringStageProcessor"
    			class="org.springextensions.actionscript.stage.DefaultAutowiringStageProcessor"
    			singleton="true">
    		<property name="autowireOnce"
    				  value="false"/>
    	</object>
    ...
    
    </objects>
    I think the files are well configured and donít have a clue what happens here at the first requerst.

    Does someone have an idea whatís going wrong?

  • #2
    Hello

    Could you post the complete error stack trace?
    Perhaps more details are there

    Post the settings configuration about

    Code:
    <value>WEB-INF/config/db.properties</value>
    <value>WEB-INF/config/MySQL_dynamicTime.properties</value>
    Some value could be the blame

    Comment


    • #3
      Hello,

      here is the complete stacktrace

      Code:
      org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; 
      nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
      	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382)
      	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(
      AbstractPlatformTransactionManager.java:371)
      	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(
      TransactionAspectSupport.java:335)
      	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	$Proxy52.loadUserByUsername(Unknown Source)
      	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:
      86)
      	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(
      AbstractUserDetailsAuthenticationProvider.java:129)
      	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
      	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.
      java:48)
      	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
      	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.
      java:48)
      	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(
      UsernamePasswordAuthenticationFilter.java:97)
      	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(
      AbstractAuthenticationProcessingFilter.java:199)
      	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.
      java:79)
      	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
      	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
      	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

      db.properties
      Code:
      # the driver class which is used to access the db
      # db.driver=org.h2.Driver
      db.driver=com.mysql.jdbc.Driver
      
      # the URL to the database
      db.url=jdbc:mysql://somedomain.com:3306/name_db?characterEncoding\=UTF-8
      
      # technical username for database
      db.username=changed
      
      # password for technical user
      db.password=changed
      
      # JPA Vendor adapter database dialect
      db.dialect=MYSQL
      
      # setting for Hibernate what to do with the database schema
      # db.hibernate.hbm2ddl.auto=create-drop
      db.hibernate.hbm2ddl.auto=update
      
      #  The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.
      db.maxActive=30
      
      #  The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
      db.maxIdle=30
      
      #---------------------------------------------
      # Settings for Mart db				 |
      #---------------------------------------------
      
      # the driver class which is used to access the db
      # mart.db.driver=org.h2.Driver
      mart.db.driver=com.mysql.jdbc.Driver
      
      # the URL to the database
      mart.db.url=jdbc:mysql://somedomain.com:3306/vw?characterEncoding=UTF-8
      
      # technical username for database
      # mart.db.username=
      mart.db.username=dev
      
      # password for technical user
      # mart.db.password=
      mart.db.password=dev
      
      # JPA Vendor adapter database dialect
      # mart.db.dialect=H2
      mart.db.dialect=MYSQL
      
      # setting for Hibernate what to do with the database schema
      # mart.db.hibernate.hbm2ddl.auto=create-drop
      mart.db.hibernate.hbm2ddl.auto=create-drop
      
      #  The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.
      mart.db.maxActive=30
      
      #  The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
      mart.db.maxIdle=30
      
      # Sets the default limitation of result sets for mart queries.
      # This setting can be overwritten by setting maxResult property in DatasourceTemplate.
      mart.db.defaultMaxResults=500

      The MySQL_dynamicTime.properties contains some special sql which can't be the probleme I think
      e.g.
      Code:
      today=SELECT  MIN(date_id), MAX(date_id) FROM  date_dim WHERE   date_id \= \:today;
      yesterday=SELECT  MIN(date_id), MAX(date_id) FROM  date_dim WHERE   date_id \= DATE_ADD(\:today, INTERVAL -1 DAY);
      Last edited by examarc; Aug 10th, 2011, 09:44 AM.

      Comment


      • #4
        Hello

        Just some thoughts

        1) be carefull with this property
        db.hibernate.hbm2ddl.auto=update, is not recommendable for production

        1.1) mart.db.hibernate.hbm2ddl.auto=create-drop
        I suggest you strongly avoid such value for production

        2) About db.dialect=MYSQL and mart.db.dialect=MYSQL, Hibernate has a special value if you work with MySQL 5 series

        You are working with 2 databases, right?

        The MySQL_dynamicTime.properties contains some special sql which can't be the probleme I think
        Could be, if you have more than you have shown, try to log them what value(s) return when you start the server and fail, perhaps exists some relation

        According with your error stack trace, if it is the complete stack, seems the error cames from Spring Security

        Code:
        org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
        org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
        org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
        org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        If you can post how you are doing the authentication control would be better, could you be using jdbc control?

        Comment


        • #5
          THis might help: http://forum.springsource.org/archiv...p/t-22390.html

          Comment


          • #6
            Thank you for your answers.
            here ist the whole stack trace. I have to split it into 3 pieces as it is too long for one post.

            I tried implementing a autoReconnect without success. The error keeps occuring on the first attempt.


            Code:
            HTTP Status 500 -
            
            type Exception report
            
            message
            
            description The server encountered an internal error () that prevented it from fulfilling this request.
            
            exception
            
            org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
            	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382)
            	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
            	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
            	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
            	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            	$Proxy52.loadUserByUsername(Unknown Source)
            	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
            	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
            	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
            	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
            	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
            	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
            	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
            	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
            	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
            
            root cause
            
            javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
            	org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
            	org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
            	org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1224)
            	org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:63)
            	org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
            	org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57)
            	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332)
            	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
            	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
            	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
            	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            	$Proxy52.loadUserByUsername(Unknown Source)
            	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
            	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
            	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
            	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
            	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
            	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
            	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
            	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
            	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
            	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

            Comment


            • #7
              Code:
              root cause
              
              org.hibernate.TransactionException: JDBC begin failed: 
              	org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:92)
              	org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
              	org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
              	org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
              	org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57)
              	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332)
              	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
              	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
              	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
              	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
              	$Proxy52.loadUserByUsername(Unknown Source)
              	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
              	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
              	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
              	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
              	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
              	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
              	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
              	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
              	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
              	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
              
              root cause
              
              com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 37.330.524 milliseconds ago.  The last packet sent successfully to the server was 37.330.524 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
              	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              	sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              	java.lang.reflect.Constructor.newInstance(Constructor.java:532)
              	com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
              	com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
              	com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3348)
              	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1967)
              	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
              	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
              	com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5022)
              	org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371)
              	org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328)
              	org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:87)
              	org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
              	org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
              	org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
              	org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57)
              	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332)
              	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
              	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
              	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
              	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
              	$Proxy52.loadUserByUsername(Unknown Source)
              	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
              	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
              	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
              	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
              	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
              	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
              	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
              	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
              	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
              	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
              	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
              	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
              
              root cause

              Comment


              • #8
                Code:
                java.net.SocketException: Broken pipe
                	java.net.SocketOutputStream.socketWrite0(Native Method)
                	java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
                	java.net.SocketOutputStream.write(SocketOutputStream.java:153)
                	java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
                	java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
                	com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3329)
                	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1967)
                	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
                	com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
                	com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5022)
                	org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371)
                	org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328)
                	org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:87)
                	org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
                	org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
                	org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70)
                	org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57)
                	org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332)
                	org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
                	org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335)
                	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105)
                	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
                	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                	$Proxy52.loadUserByUsername(Unknown Source)
                	org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
                	org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
                	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
                	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
                	org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:148)
                	org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
                	org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
                	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
                	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
                	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
                	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
                	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
                	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
                	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
                	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
                	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

                Comment

                Working...
                X