• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to configure the datasource using JDBCtemplate (Spring)

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • 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.

Try_Spring.png
[Thumbnail for Try_Spring.png]
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to request the mediator to move the previous post to the right forum???....
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this case, the quickest way is to use the button in your own post and write your request to move the topic into the messagebox that appears.

You can also contact a forum moderator directly: at the forum page (eg. here) is a list of moderators for that forum. Click on individual moderator's name and use the PM button to send him/her a message.

I'll move your question to the Spring forum, as it seems the best suited for your question.
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks, hoping for some help soon...I cant move forward with the project as I am stuck...
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and your questions is? How to configure data source?
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Sorry for not being clear with my question, I am getting the error shown in the XML attached in this post. And yes my question in general is "how connect/configure to the datasource using JDBC template?". Thank you in advance.
Try_Spring2.png
[Thumbnail for Try_Spring2.png]
 
Martin Vashko
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's better to avoid posting screenshots where a text would do; for reasons see PostTextNotScreenshots.

However, in this particular case, the file in the screenshot is different from the file you posted in your question. The <bean> tag is not closed, and the error message in the screenshot says so. What happens when you restore the contents of the file you've initially posted in this thread?
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I restored the properties that I sent intially in the thread...I close tag <bean/> but the error is still there.. plus another error that "cannot resolve property driverClassName". Please help? Could there be something wrong in the XML file...

 
Saifuddin Merchant
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The configuration looks correct. Maybe in something in the way your IDE is setup, that's causing those error to show up. Do you have any issues when you actually run the code?

Sample Config:


Ref:
https://github.com/SpringSource/spring-batch/blob/master/spring-batch-samples/src/main/resources/data-source-context.xml
 
Nimu Chox
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Saifuddin Merchant
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Download the apache commons DBCP http://commons.apache.org/dbcp/download_dbcp.cgi and add it to your classpath. If you are using maven you can add the Dependency in your POM
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic