Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Connecting to Database using JDBC template (Spring)

 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Nimu Chox,

Welcome to CodeRanch!

Please TellTheDetails. What this xml file is about? Are you deploying any web application? Is it servlet/jsp or ejb? Either way, it does not seem to be 'beginning java' question.

We have dedicated forums for servlet, jsp, jdbc and ejb. You can request moderator to move this topic to appropriate forum.
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Report post to moderator
Aim: In this XML file, I am configuring the data source, I will use the database instance in class "CityDaoImpl" - please see the code


I am getting an error "Top level element´╗┐ is not comepleted/Valid XML must have a root tag" in this line:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">

Try_Spring.png
[Thumbnail for Try_Spring.png]
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Recreated at http://www.coderanch.com/t/572956/JDBC/java/Connecting-Database-JDBC-template-Spring.
 
    Bookmark Topic Watch Topic
  • New Topic