org.hibernate.exception.GenericJDBCException: could not prepare statement

GitHub | 805728578 | 3 months ago
  1. 0

    运行一段时间报错(1.0.19版本)

    GitHub | 3 months ago | 805728578
    org.hibernate.exception.GenericJDBCException: could not prepare statement
  2. 0

    java.sql.SQLException: connection holder is null, druid是1.0.13

    GitHub | 1 year ago | toby2
    java.sql.SQLException: connection holder is null
  3. 0

    java.sql.SQLException: sql injection violation, deny object : dbms_random

    Stack Overflow | 2 years ago | ArenaGod
    com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: sql injection violation, deny object : dbms_random : select distinct (a.demand_id) as demand_id, a.demand_title as demand_title, f.product_version_id, h.name, to_char(a.qa_time, 'yyyy-mm-dd') as qa_time, e.op_name as op_name, dbms_random.value(1, 100) as datas from demand_request a, assignment b, group_op_info d, op_login e, product_version f, project g, province h where a.demand_id = b.demand_id and b.closer_id = d.op_id and d.op_id = e.op_id and a.project_code = g.proj_code and g.area_id = h.id
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 820#100646655

    GitHub | 2 years ago | wing1000
    java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'like "%"?"%" and status = 'display'',expect QUES, actual QUES % : select * from article where title like "%"?"%" and status = 'display' and `check` = 'yes' order by createTime desc limit ?,?
  6. 0

    druid-1.0.9 执行 CREATE DATABASE `testRep` CHARACTER SET utf8 COLLATE utf8_general_ci 异常

    GitHub | 10 months ago | zhuam
    java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'Rep` CHARACTER SET utf8 COLLATE utf',expect IDENTIFIER, actual IDENTIFIER CHARACTER : CREATE DATABASE `testRep` CHARACTER SET utf8 COLLATE utf8_general_ci

    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 holder is null

      at com.alibaba.druid.pool.DruidPooledConnection.checkStateInternal()
    2. druid
      DruidPooledConnection.prepareStatement
      1. com.alibaba.druid.pool.DruidPooledConnection.checkStateInternal(DruidPooledConnection.java:1122)
      2. com.alibaba.druid.pool.DruidPooledConnection.checkState(DruidPooledConnection.java:1113)
      3. com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:318)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. Spring Framework
      LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke
      1. org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:375)
      1 frame
    5. com.sun.proxy
      $Proxy21.prepareStatement
      1. com.sun.proxy.$Proxy21.prepareStatement(Unknown Source)
      1 frame
    6. Hibernate
      CriteriaImpl.list
      1. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:159)
      2. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:183)
      3. org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:157)
      4. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1881)
      5. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1858)
      6. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838)
      7. org.hibernate.loader.Loader.doQuery(Loader.java:906)
      8. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348)
      9. org.hibernate.loader.Loader.doList(Loader.java:2550)
      10. org.hibernate.loader.Loader.doList(Loader.java:2536)
      11. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366)
      12. org.hibernate.loader.Loader.list(Loader.java:2361)
      13. org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:124)
      14. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1623)
      15. org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
      15 frames
    7. com.wafersystems.dao
      CommonDAOImpl.findByCriteria
      1. com.wafersystems.dao.impl.CommonDAOImpl.findByCriteria(CommonDAOImpl.java:132)
      1 frame
    8. com.wafersystems.service
      DepartMentServiceImpl$$FastClassBySpringCGLIB$$5a4ec6d6.invoke
      1. com.wafersystems.service.impl.department.DepartMentServiceImpl.getdepartmentByNodeCode(DepartMentServiceImpl.java:371)
      2. com.wafersystems.service.impl.department.DepartMentServiceImpl.getAllDeptCodebyChildNode(DepartMentServiceImpl.java:511)
      3. com.wafersystems.service.impl.department.DepartMentServiceImpl$$FastClassBySpringCGLIB$$5a4ec6d6.invoke(<generated>)
      3 frames
    9. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    10. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      2 frames
    11. druid
      DruidStatInterceptor.invoke
      1. com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
      1 frame
    12. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    13. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      3 frames
    14. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      4. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
      4 frames
    15. com.wafersystems.service
      MeetingRoomServiceImpl$$FastClassBySpringCGLIB$$356bcaae.invoke
      1. com.wafersystems.service.impl.department.DepartMentServiceImpl$$EnhancerBySpringCGLIB$$e8d5ec55.getAllDeptCodebyChildNode(<generated>)
      2. com.wafersystems.service.impl.MeetingRoomServiceImpl.getMeetingRoomForReservedConference(MeetingRoomServiceImpl.java:163)
      3. com.wafersystems.service.impl.MeetingRoomServiceImpl$$FastClassBySpringCGLIB$$356bcaae.invoke(<generated>)
      3 frames
    16. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    17. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      2 frames
    18. druid
      DruidStatInterceptor.invoke
      1. com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
      1 frame
    19. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    20. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      3 frames
    21. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      4. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
      4 frames
    22. com.wafersystems.service
      ZoneServiceImpl$$FastClassBySpringCGLIB$$9e34f036.invoke
      1. com.wafersystems.service.impl.MeetingRoomServiceImpl$$EnhancerBySpringCGLIB$$1f520d2d.getMeetingRoomForReservedConference(<generated>)
      2. com.wafersystems.service.impl.zone.ZoneServiceImpl.getAllZoneForReservedConference(ZoneServiceImpl.java:1098)
      3. com.wafersystems.service.impl.zone.ZoneServiceImpl$$FastClassBySpringCGLIB$$9e34f036.invoke(<generated>)
      3 frames
    23. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    24. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:700)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      2 frames
    25. druid
      DruidStatInterceptor.invoke
      1. com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
      1 frame
    26. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    27. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
      3 frames
    28. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      4. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
      4 frames
    29. com.wafersystems.service
      ZoneServiceImpl$$EnhancerBySpringCGLIB$$e59f49b5.getAllZoneForReservedConference
      1. com.wafersystems.service.impl.zone.ZoneServiceImpl$$EnhancerBySpringCGLIB$$e59f49b5.getAllZoneForReservedConference(<generated>)
      1 frame
    30. com.wafersystems.controller
      UserAndDepartmentController.getValidZoneAndRoom
      1. com.wafersystems.controller.UserAndDepartmentController.getValidZoneAndRoom(UserAndDepartmentController.java:670)
      1 frame
    31. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    32. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
      2 frames
    33. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:855)
      8 frames
    34. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
      1 frame
    35. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
      1 frame
    36. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      1 frame
    37. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    38. com.wafersystems.filter
      AuthenticationFilter.doFilter
      1. com.wafersystems.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:162)
      1 frame
    39. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    40. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    41. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    42. druid
      WebStatFilter.doFilter
      1. com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
      1 frame
    43. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    44. Spring ORM
      OpenSessionInViewFilter.doFilterInternal
      1. org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
      1 frame
    45. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      1 frame
    46. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    47. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      2 frames
    48. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      10 frames
    49. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
      3 frames
    50. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      2 frames
    51. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    52. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame