Announcement Announcement Module
Collapse
No announcement yet.
HibernateTemplate and database connection problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HibernateTemplate and database connection problem

    Hello
    Im using HibernateTemplate load() or execute() methods.
    :?: Is there any way to manage the connection to database problems? :?:

    When the DB is down the jdbc driver throws the ConnectionException which I cant catch. How can I tell that something wrong with database or network?

    Some logs below:
    Code:
    2004-12-08 16&#58;51&#58;08,903 DEBUG &#91;my.code.manager.Manager&#93; - <=Creating new HibernateTemplate=>
    2004-12-08 16&#58;51&#58;08,903 DEBUG &#91;my.code.manager.Manager&#93; - <=New HibernateTemplate created&#58; org.springframework.orm.hibernate.HibernateTemplate@c8d62f=>
    2004-12-08 16&#58;51&#58;09,974 WARN &#91;net.sf.hibernate.util.JDBCExceptionReporter&#93; - <=SQL Error&#58; 0, SQLState&#58; 08S01=>
    2004-12-08 16&#58;51&#58;09,974 ERROR &#91;net.sf.hibernate.util.JDBCExceptionReporter&#93; - <=Unable to connect to any hosts due to exception&#58; java.net.ConnectException&#58; Connection refused&#58; connect
    
    ** BEGIN NESTED EXCEPTION **
    
    java.net.ConnectException
    MESSAGE&#58; Connection refused&#58; connect
    
    STACKTRACE&#58;
    
    java.net.ConnectException&#58; Connection refused&#58; connect
            at java.net.PlainSocketImpl.socketConnect&#40;Native Method&#41;
            at java.net.PlainSocketImpl.doConnect&#40;PlainSocketImpl.java&#58;305&#41;
            at java.net.PlainSocketImpl.connectToAddress&#40;PlainSocketImpl.java&#58;171&#41;
            at java.net.PlainSocketImpl.connect&#40;PlainSocketImpl.java&#58;158&#41;
            at java.net.Socket.connect&#40;Socket.java&#58;452&#41;
            at java.net.Socket.connect&#40;Socket.java&#58;402&#41;
            at java.net.Socket.<init>&#40;Socket.java&#58;309&#41;
            at java.net.Socket.<init>&#40;Socket.java&#58;124&#41;
            at com.mysql.jdbc.StandardSocketFactory.connect&#40;StandardSocketFactory.java&#58;124&#41;
            at com.mysql.jdbc.MysqlIO.<init>&#40;MysqlIO.java&#58;225&#41;
            at com.mysql.jdbc.Connection.createNewIO&#40;Connection.java&#58;1779&#41;
            at com.mysql.jdbc.Connection.<init>&#40;Connection.java&#58;450&#41;
            at com.mysql.jdbc.NonRegisteringDriver.connect&#40;NonRegisteringDriver.java&#58;411&#41;
            at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;512&#41;
            at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;140&#41;
            at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection&#40;DriverManagerConnectionFactory.java&#58;51&#41;
            at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject&#40;PoolableConnectionFactory.java&#58;290&#41;
            at org.apache.commons.pool.impl.GenericObjectPool.borrowObject&#40;GenericObjectPool.java&#58;771&#41;
            at org.apache.commons.dbcp.PoolingDataSource.getConnection&#40;PoolingDataSource.java&#58;95&#41;
            at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection&#40;DBCPConnectionProvider.java&#58;41&#41;
            at net.sf.hibernate.impl.BatcherImpl.openConnection&#40;BatcherImpl.java&#58;286&#41;
            at net.sf.hibernate.impl.SessionImpl.connect&#40;SessionImpl.java&#58;3326&#41;
            at net.sf.hibernate.impl.SessionImpl.connection&#40;SessionImpl.java&#58;3286&#41;
    alcik :|

  • #2
    HibernateTemplate automatically convert SQL / Hibernate Exceptions into DataAccessexception (unchecked exception). You should catch this exception into your client code.
    HTH

    Comment


    • #3
      Hello,

      thank you for your reply.
      The problem is that Im catching this exception in my code. But Spring seems does not convert this exception. JDBC driver does not throw SQLException or hibernate exception but ConnectException. Maybe it is a problem in hibernate, because log shows that JDBCExceptionReporter reports a problem but I dont know if hibernate converts this to some hibernate exception (which could be then converted by Spring). I will check the newest version of the mysql jdbc driver and maybe the
      hibernate site.

      best regards,
      alcik

      Originally posted by irbouho
      HibernateTemplate automatically convert SQL / Hibernate Exceptions into DataAccessexception (unchecked exception). You should catch this exception into your client code.
      HTH

      Comment


      • #4
        It looks from your logs that MySQL throws an SQLException that wraps the java.net.ConnectException. Spring would translate this to an UncategorizedDataAccessException since there is no error code in the SQLException. Could you post some more from the log?

        Comment


        • #5
          OK. Below is full exception text.

          Code:
          2004-12-22 14&#58;44&#58;09,457 WARN &#91;net.sf.hibernate.util.JDBCExceptionReporter&#93; - <=SQL Error&#58; 0, SQLState&#58; 08S01=>
          2004-12-22 14&#58;44&#58;09,457 ERROR &#91;net.sf.hibernate.util.JDBCExceptionReporter&#93; - <=Unable to connect to any hosts due to exception&#58; java.net.Co
          nnectException&#58; Connection refused&#58; connect
          
          ** BEGIN NESTED EXCEPTION **
          
          java.net.ConnectException
          MESSAGE&#58; Connection refused&#58; connect
          
          STACKTRACE&#58;
          
          java.net.ConnectException&#58; Connection refused&#58; connect
                  at java.net.PlainSocketImpl.socketConnect&#40;Native Method&#41;
                  at java.net.PlainSocketImpl.doConnect&#40;PlainSocketImpl.java&#58;305&#41;
                  at java.net.PlainSocketImpl.connectToAddress&#40;PlainSocketImpl.java&#58;171&#41;
                  at java.net.PlainSocketImpl.connect&#40;PlainSocketImpl.java&#58;158&#41;
                  at java.net.Socket.connect&#40;Socket.java&#58;452&#41;
                  at java.net.Socket.connect&#40;Socket.java&#58;402&#41;
                  at java.net.Socket.<init>&#40;Socket.java&#58;309&#41;
                  at java.net.Socket.<init>&#40;Socket.java&#58;124&#41;
                  at com.mysql.jdbc.StandardSocketFactory.connect&#40;StandardSocketFactory.java&#58;124&#41;
                  at com.mysql.jdbc.MysqlIO.<init>&#40;MysqlIO.java&#58;225&#41;
                  at com.mysql.jdbc.Connection.createNewIO&#40;Connection.java&#58;1779&#41;
                  at com.mysql.jdbc.Connection.<init>&#40;Connection.java&#58;450&#41;
                  at com.mysql.jdbc.NonRegisteringDriver.connect&#40;NonRegisteringDriver.java&#58;411&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;512&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;140&#41;
                  at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection&#40;DriverManagerConnectionFactory.java&#58;51&#41;
                  at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject&#40;PoolableConnectionFactory.java&#58;290&#41;
                  at org.apache.commons.pool.impl.GenericObjectPool.borrowObject&#40;GenericObjectPool.java&#58;771&#41;
                  at org.apache.commons.dbcp.PoolingDataSource.getConnection&#40;PoolingDataSource.java&#58;95&#41;
                  at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection&#40;DBCPConnectionProvider.java&#58;41&#41;
                  at net.sf.hibernate.impl.BatcherImpl.openConnection&#40;BatcherImpl.java&#58;286&#41;
                  at net.sf.hibernate.impl.SessionImpl.connect&#40;SessionImpl.java&#58;3326&#41;
                  at net.sf.hibernate.impl.SessionImpl.connection&#40;SessionImpl.java&#58;3286&#41;
                  at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement&#40;BatcherImpl.java&#58;65&#41;
                  at net.sf.hibernate.loader.Loader.prepareQueryStatement&#40;Loader.java&#58;779&#41;
                  at net.sf.hibernate.loader.Loader.doQuery&#40;Loader.java&#58;265&#41;
                  at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections&#40;Loader.java&#58;133&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;911&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;931&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;59&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;51&#41;
                  at net.sf.hibernate.persister.EntityPersister.load&#40;EntityPersister.java&#58;419&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoad&#40;SessionImpl.java&#58;2117&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoadByClass&#40;SessionImpl.java&#58;1991&#41;
                  at net.sf.hibernate.impl.SessionImpl.load&#40;SessionImpl.java&#58;1920&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate$3.doInHibernate&#40;HibernateTemplate.java&#58;198&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.execute&#40;HibernateTemplate.java&#58;150&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.load&#40;HibernateTemplate.java&#58;196&#41;
                  at pl.infovide.tpse.manager.TestPlanManager.getSimpleTestPlan&#40;TestPlanManager.java&#58;86&#41;
                  at pl.infovide.tpse.struts.BaseAction.putTestPlanInRequest&#40;BaseAction.java&#58;113&#41;
                  at pl.infovide.tpse.struts.BaseAction.checkTestPlan&#40;BaseAction.java&#58;93&#41;
                  at pl.infovide.tpse.struts.RelatedDocumentViewAction.execute&#40;RelatedDocumentViewAction.java&#58;64&#41;
                  at org.springframework.web.struts.DelegatingActionProxy.execute&#40;DelegatingActionProxy.java&#58;131&#41;
                  at org.apache.struts.action.RequestProcessor.processActionPerform&#40;RequestProcessor.java&#58;421&#41;
                  at org.apache.struts.action.RequestProcessor.process&#40;RequestProcessor.java&#58;226&#41;
                  at org.apache.struts.action.ActionServlet.process&#40;ActionServlet.java&#58;1164&#41;
                  at org.apache.struts.action.ActionServlet.doGet&#40;ActionServlet.java&#58;397&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;689&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;237&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at pl.infovide.tpse.web.SetCharacterEncodingFilter.doFilter&#40;SetCharacterEncodingFilter.java&#58;123&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;186&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;214&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardContextValve.invokeInternal&#40;StandardContextValve.java&#58;198&#41;
                  at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;152&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;137&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;118&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;102&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;109&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;929&#41;
                  at org.apache.coyote.tomcat5.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;160&#41;
                  at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;799&#41;
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;705&#41;
                  at org.apache.tomcat.util.net.TcpWorkerThread.runIt&#40;PoolTcpEndpoint.java&#58;577&#41;
                  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;683&#41;
                  at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
          
          
          ** END NESTED EXCEPTION **
          
          =>
          2004-12-22 14&#58;44&#58;09,507 ERROR &#91;net.sf.hibernate.util.JDBCExceptionReporter&#93; - <=Cannot open connection=>
          java.sql.SQLException&#58; Unable to connect to any hosts due to exception&#58; java.net.ConnectException&#58; Connection refused&#58; connect
          
          ** BEGIN NESTED EXCEPTION **
          
          java.net.ConnectException
          MESSAGE&#58; Connection refused&#58; connect
          
          STACKTRACE&#58;
          
          java.net.ConnectException&#58; Connection refused&#58; connect
                  at java.net.PlainSocketImpl.socketConnect&#40;Native Method&#41;
                  at java.net.PlainSocketImpl.doConnect&#40;PlainSocketImpl.java&#58;305&#41;
                  at java.net.PlainSocketImpl.connectToAddress&#40;PlainSocketImpl.java&#58;171&#41;
                  at java.net.PlainSocketImpl.connect&#40;PlainSocketImpl.java&#58;158&#41;
                  at java.net.Socket.connect&#40;Socket.java&#58;452&#41;
                  at java.net.Socket.connect&#40;Socket.java&#58;402&#41;
                  at java.net.Socket.<init>&#40;Socket.java&#58;309&#41;
                  at java.net.Socket.<init>&#40;Socket.java&#58;124&#41;
                  at com.mysql.jdbc.StandardSocketFactory.connect&#40;StandardSocketFactory.java&#58;124&#41;
                  at com.mysql.jdbc.MysqlIO.<init>&#40;MysqlIO.java&#58;225&#41;
                  at com.mysql.jdbc.Connection.createNewIO&#40;Connection.java&#58;1779&#41;
                  at com.mysql.jdbc.Connection.<init>&#40;Connection.java&#58;450&#41;
                  at com.mysql.jdbc.NonRegisteringDriver.connect&#40;NonRegisteringDriver.java&#58;411&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;512&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;140&#41;
                  at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection&#40;DriverManagerConnectionFactory.java&#58;51&#41;
                  at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject&#40;PoolableConnectionFactory.java&#58;290&#41;
                  at org.apache.commons.pool.impl.GenericObjectPool.borrowObject&#40;GenericObjectPool.java&#58;771&#41;
                  at org.apache.commons.dbcp.PoolingDataSource.getConnection&#40;PoolingDataSource.java&#58;95&#41;
                  at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection&#40;DBCPConnectionProvider.java&#58;41&#41;
                  at net.sf.hibernate.impl.BatcherImpl.openConnection&#40;BatcherImpl.java&#58;286&#41;
                  at net.sf.hibernate.impl.SessionImpl.connect&#40;SessionImpl.java&#58;3326&#41;
                  at net.sf.hibernate.impl.SessionImpl.connection&#40;SessionImpl.java&#58;3286&#41;
                  at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement&#40;BatcherImpl.java&#58;65&#41;
                  at net.sf.hibernate.loader.Loader.prepareQueryStatement&#40;Loader.java&#58;779&#41;
                  at net.sf.hibernate.loader.Loader.doQuery&#40;Loader.java&#58;265&#41;
                  at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections&#40;Loader.java&#58;133&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;911&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;931&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;59&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;51&#41;
                  at net.sf.hibernate.persister.EntityPersister.load&#40;EntityPersister.java&#58;419&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoad&#40;SessionImpl.java&#58;2117&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoadByClass&#40;SessionImpl.java&#58;1991&#41;
                  at net.sf.hibernate.impl.SessionImpl.load&#40;SessionImpl.java&#58;1920&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate$3.doInHibernate&#40;HibernateTemplate.java&#58;198&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.execute&#40;HibernateTemplate.java&#58;150&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.load&#40;HibernateTemplate.java&#58;196&#41;
                  at pl.infovide.tpse.manager.TestPlanManager.getSimpleTestPlan&#40;TestPlanManager.java&#58;86&#41;
                  at pl.infovide.tpse.struts.BaseAction.putTestPlanInRequest&#40;BaseAction.java&#58;113&#41;
                  at pl.infovide.tpse.struts.BaseAction.checkTestPlan&#40;BaseAction.java&#58;93&#41;
                  at pl.infovide.tpse.struts.RelatedDocumentViewAction.execute&#40;RelatedDocumentViewAction.java&#58;64&#41;
                  at org.springframework.web.struts.DelegatingActionProxy.execute&#40;DelegatingActionProxy.java&#58;131&#41;
                  at org.apache.struts.action.RequestProcessor.processActionPerform&#40;RequestProcessor.java&#58;421&#41;
                  at org.apache.struts.action.RequestProcessor.process&#40;RequestProcessor.java&#58;226&#41;
                  at org.apache.struts.action.ActionServlet.process&#40;ActionServlet.java&#58;1164&#41;
                  at org.apache.struts.action.ActionServlet.doGet&#40;ActionServlet.java&#58;397&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;689&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;237&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at pl.infovide.tpse.web.SetCharacterEncodingFilter.doFilter&#40;SetCharacterEncodingFilter.java&#58;123&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;186&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;214&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardContextValve.invokeInternal&#40;StandardContextValve.java&#58;198&#41;
                  at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;152&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;137&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;118&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;102&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;109&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;929&#41;
                  at org.apache.coyote.tomcat5.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;160&#41;
                  at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;799&#41;
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;705&#41;
                  at org.apache.tomcat.util.net.TcpWorkerThread.runIt&#40;PoolTcpEndpoint.java&#58;577&#41;
                  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;683&#41;
                  at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
          
          
          ** END NESTED EXCEPTION **
          
          
                  at com.mysql.jdbc.Connection.createNewIO&#40;Connection.java&#58;1847&#41;
                  at com.mysql.jdbc.Connection.<init>&#40;Connection.java&#58;450&#41;
                  at com.mysql.jdbc.NonRegisteringDriver.connect&#40;NonRegisteringDriver.java&#58;411&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;512&#41;
                  at java.sql.DriverManager.getConnection&#40;DriverManager.java&#58;140&#41;
                  at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection&#40;DriverManagerConnectionFactory.java&#58;51&#41;
                  at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject&#40;PoolableConnectionFactory.java&#58;290&#41;
                  at org.apache.commons.pool.impl.GenericObjectPool.borrowObject&#40;GenericObjectPool.java&#58;771&#41;
                  at org.apache.commons.dbcp.PoolingDataSource.getConnection&#40;PoolingDataSource.java&#58;95&#41;
                  at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection&#40;DBCPConnectionProvider.java&#58;41&#41;
                  at net.sf.hibernate.impl.BatcherImpl.openConnection&#40;BatcherImpl.java&#58;286&#41;
                  at net.sf.hibernate.impl.SessionImpl.connect&#40;SessionImpl.java&#58;3326&#41;
                  at net.sf.hibernate.impl.SessionImpl.connection&#40;SessionImpl.java&#58;3286&#41;
                  at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement&#40;BatcherImpl.java&#58;65&#41;
                  at net.sf.hibernate.loader.Loader.prepareQueryStatement&#40;Loader.java&#58;779&#41;
                  at net.sf.hibernate.loader.Loader.doQuery&#40;Loader.java&#58;265&#41;
                  at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections&#40;Loader.java&#58;133&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;911&#41;
                  at net.sf.hibernate.loader.Loader.loadEntity&#40;Loader.java&#58;931&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;59&#41;
                  at net.sf.hibernate.loader.EntityLoader.load&#40;EntityLoader.java&#58;51&#41;
                  at net.sf.hibernate.persister.EntityPersister.load&#40;EntityPersister.java&#58;419&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoad&#40;SessionImpl.java&#58;2117&#41;
                  at net.sf.hibernate.impl.SessionImpl.doLoadByClass&#40;SessionImpl.java&#58;1991&#41;
                  at net.sf.hibernate.impl.SessionImpl.load&#40;SessionImpl.java&#58;1920&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate$3.doInHibernate&#40;HibernateTemplate.java&#58;198&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.execute&#40;HibernateTemplate.java&#58;150&#41;
                  at org.springframework.orm.hibernate.HibernateTemplate.load&#40;HibernateTemplate.java&#58;196&#41;
                  at pl.infovide.tpse.manager.TestPlanManager.getSimpleTestPlan&#40;TestPlanManager.java&#58;86&#41;
                  at pl.infovide.tpse.struts.BaseAction.putTestPlanInRequest&#40;BaseAction.java&#58;113&#41;
                  at pl.infovide.tpse.struts.BaseAction.checkTestPlan&#40;BaseAction.java&#58;93&#41;
                  at pl.infovide.tpse.struts.RelatedDocumentViewAction.execute&#40;RelatedDocumentViewAction.java&#58;64&#41;
                  at org.springframework.web.struts.DelegatingActionProxy.execute&#40;DelegatingActionProxy.java&#58;131&#41;
                  at org.apache.struts.action.RequestProcessor.processActionPerform&#40;RequestProcessor.java&#58;421&#41;
                  at org.apache.struts.action.RequestProcessor.process&#40;RequestProcessor.java&#58;226&#41;
                  at org.apache.struts.action.ActionServlet.process&#40;ActionServlet.java&#58;1164&#41;
                  at org.apache.struts.action.ActionServlet.doGet&#40;ActionServlet.java&#58;397&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;689&#41;
                  at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;237&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at pl.infovide.tpse.web.SetCharacterEncodingFilter.doFilter&#40;SetCharacterEncodingFilter.java&#58;123&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;186&#41;
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;157&#41;
                  at org.apache.catalina.core.StandardWrapperValve.invoke&#40;StandardWrapperValve.java&#58;214&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardContextValve.invokeInternal&#40;StandardContextValve.java&#58;198&#41;
                  at org.apache.catalina.core.StandardContextValve.invoke&#40;StandardContextValve.java&#58;152&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardHostValve.invoke&#40;StandardHostValve.java&#58;137&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.valves.ErrorReportValve.invoke&#40;ErrorReportValve.java&#58;118&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;102&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.StandardEngineValve.invoke&#40;StandardEngineValve.java&#58;109&#41;
                  at org.apache.catalina.core.StandardValveContext.invokeNext&#40;StandardValveContext.java&#58;104&#41;
                  at org.apache.catalina.core.StandardPipeline.invoke&#40;StandardPipeline.java&#58;520&#41;
                  at org.apache.catalina.core.ContainerBase.invoke&#40;ContainerBase.java&#58;929&#41;
                  at org.apache.coyote.tomcat5.CoyoteAdapter.service&#40;CoyoteAdapter.java&#58;160&#41;
                  at org.apache.coyote.http11.Http11Processor.process&#40;Http11Processor.java&#58;799&#41;
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection&#40;Http11Protocol.java&#58;705&#41;
                  at org.apache.tomcat.util.net.TcpWorkerThread.runIt&#40;PoolTcpEndpoint.java&#58;577&#41;
                  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run&#40;ThreadPool.java&#58;683&#41;
                  at java.lang.Thread.run&#40;Thread.java&#58;534&#41;

          Comment


          • #6
            OK... yes, U R right. It is really converting it to UncategorizedDataAccessException. Sorry for my stupidity.
            :oops:
            Thank you very much... best regards.

            Comment

            Working...
            X