Announcement Announcement Module
No announcement yet.
Spring JdbcTemplate usage Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JdbcTemplate usage


    I am new to Spring JdbcTemplate. Before that I have used the Struts MVC, Now I have implemented the Struts MVC with in the Spring Framework. Instead of putting connection properties in context.xml file, I have used xml file in WEB-INF/Classes folder. I have called that file in ApplicationContextPath class.

    I have passes the datasource in JdbcTemplate class. After we had implemented this, sometimes we got error as

    org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is java.sql.SQLException:Connection Refused

    What is the solution for this.What is the difference to use pure StrutsMvc and Spring JdbcTemplate to read the Database connection.

    Thanks and Regards


  • #2
    I'm not sure I understand what your question is. Is it possible to see the stacktrace? By the looks of it, it's failing to get a connection. Is the database down? Have you run out of connections? Are you using a connection pool?
    Last edited by karldmoore; Aug 27th, 2007, 03:45 PM.


    • #3
      StrutsMVC is not a framework to access the database.

      And also i agree with karldmoore, your application failed to connect to database.