Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

Spring_hibernate_MYSQL_Connection_using_Datasource

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I am using Spring 4 framework + hibernate 4 framework for web application. Before mysql connection work fine. But while i used org.apache.commons.dbcp.BasicDataSource class its thrown Exception.
I Am new in spring and hibernate. Please guide for how to configure MYSQL Database Connectivity with Spring and hibernate.



spring.xml



spring_hibernate_jars.jpg
[Thumbnail for spring_hibernate_jars.jpg]
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The exception itself is telling what's missing:

If <servlet-name> in web.xml is "spring", the framework expects a "spring-servlet.xml" (ie "[servlet-name]-servlet.xml") to have the MVC controller bean definitions.
That file seems to be missing in the WAR.

reply
    Bookmark Topic Watch Topic
  • New Topic