org.springframework.orm.hibernate4.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [INSERT INTO fc_p_faclntlms1aoqglwzza0a_20161001 (time_period, prediction_count, footfall_count, unique_footfall_count, time_spent, fence_category_id, property_code, created) VALUES ('1900','2','2','2','60','19','FAPORYLMS1AOMXHHD3K4B',now()) ON DUPLICATE KEY UPDATE prediction_count=prediction_count+2, footfall_count=footfall_count+2,unique_footfall_count=unique_footfall_count+2,time_spent=time_spent+60;]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement

Stack Overflow | user6941839 | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    MYSQL / Spring Hibernate: Connection has already been closed

    Stack Overflow | 5 months ago | user6941839
    org.springframework.orm.hibernate4.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [INSERT INTO fc_p_faclntlms1aoqglwzza0a_20161001 (time_period, prediction_count, footfall_count, unique_footfall_count, time_spent, fence_category_id, property_code, created) VALUES ('1900','2','2','2','60','19','FAPORYLMS1AOMXHHD3K4B',now()) ON DUPLICATE KEY UPDATE prediction_count=prediction_count+2, footfall_count=footfall_count+2,unique_footfall_count=unique_footfall_count+2,time_spent=time_spent+60;]; SQL state [null]; error code [0]; could not prepare statement; nested exception is org.hibernate.exception.GenericJDBCException: could not prepare statement
  2. 0

    Analyzing Connection Closed Exception in Spring/JPA/Mysql/Tomcat app

    Stack Overflow | 3 years ago | ncmadhan
    java.sql.SQLException: Connection has already been closed.
  3. 0

    SQL Error: 0, SQLState: null

    Stack Overflow | 9 months ago | Vishesh
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [select this_.id as id41_0_, this_.code as code41_0_, this_.description as descript3_41_0_, this_.label as label41_0_, this_.value as value41_0_ from order_status this_]; SQL state [null]; error code [0]; could not execute query; nested exception is org.hibernate.exception.GenericJDBCException: could not execute query
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [spring data]Strange phenomenon that Querydsl does not return a connection?

    Stack Overflow | 2 months ago | 김동오
    javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not prepare statement
  6. 0

    ServletContextListener losing JNDI connection on restart

    Stack Overflow | 3 years ago
    java.sql.SQLException: PooledConnection has already been closed.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Connection has already been closed.

    at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke()
  2. org.apache.tomcat
    DisposableConnectionFacade.invoke
    1. org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:117)
    2. org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
    3. org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
    3 frames
  3. com.sun.proxy
    $Proxy33.prepareStatement
    1. com.sun.proxy.$Proxy33.prepareStatement(Unknown Source)
    1 frame
  4. Hibernate
    SQLQueryImpl.executeUpdate
    1. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$1.doPrepare(StatementPreparerImpl.java:103)
    2. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186)
    3. org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:96)
    4. org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:205)
    5. org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1310)
    6. org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:389)
    6 frames
  5. com.focus.cas
    DailyFlushDaoImpl$$FastClassBySpringCGLIB$$f7b6a91f.invoke
    1. com.focus.cas.dbaccess.mysql.flush.impl.DailyFlushDaoImpl.updateFenceCategoryProperty(DailyFlushDaoImpl.java:269)
    2. com.focus.cas.dbaccess.mysql.flush.impl.DailyFlushDaoImpl$$FastClassBySpringCGLIB$$f7b6a91f.invoke(<generated>)
    2 frames
  6. Spring Core
    MethodProxy.invoke
    1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    1 frame
  7. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    2 frames
  8. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
    1 frame
  9. Spring AOP
    MethodInvocationProceedingJoinPoint.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
    2 frames
  10. com.focus.cas
    CASAspectHandler.profile
    1. com.focus.cas.service.aspect.CASAspectHandler.logMethodExecutionTime(CASAspectHandler.java:122)
    2. com.focus.cas.service.aspect.CASAspectHandler.profile(CASAspectHandler.java:43)
    2 frames
  11. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:606)
    3 frames
  12. Spring AOP
    CglibAopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
    2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
    3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
    4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    5. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    7. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
    7 frames
  13. com.focus.cas
    FlushServiceImpl$$FastClassBySpringCGLIB$$d877b180.invoke
    1. com.focus.cas.dbaccess.mysql.flush.impl.DailyFlushDaoImpl$$EnhancerBySpringCGLIB$$1a5b5f55.updateFenceCategoryProperty(<generated>)
    2. com.focus.cas.service.flush.impl.FlushServiceImpl.updateDBFromMap(FlushServiceImpl.java:1314)
    3. com.focus.cas.service.flush.impl.FlushServiceImpl$$FastClassBySpringCGLIB$$d877b180.invoke(<generated>)
    3 frames
  14. Spring Core
    MethodProxy.invoke
    1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    1 frame
  15. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    2 frames
  16. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    3 frames
  17. Spring AOP
    CglibAopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
    2 frames
  18. com.focus.cas
    FlushServiceImpl$FlushThread.run
    1. com.focus.cas.service.flush.impl.FlushServiceImpl$$EnhancerBySpringCGLIB$$f652020f.updateDBFromMap(<generated>)
    2. com.focus.cas.service.flush.impl.FlushServiceImpl.flush(FlushServiceImpl.java:1046)
    3. com.focus.cas.service.flush.impl.FlushServiceImpl.access$100(FlushServiceImpl.java:107)
    4. com.focus.cas.service.flush.impl.FlushServiceImpl$FlushThread.run(FlushServiceImpl.java:1534)
    4 frames
  19. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame