File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Connecting to Database using JDBC template (Spring)

 
Nimu Chox
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • 0
  • 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
  • 0
  • 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: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic