Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

Connecting to Database using JDBC template (Spring)  RSS feed

 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Report post to moderator
 
Anayonkar Shivalkar
Bartender
Posts: 1558
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
Posts: 21044
85
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
Boost this thread!