Click here to Skip to main content
12,892,015 members (57,427 online)
Rate this:
Please Sign up or sign in to vote.
See more: XML Java Oracle

Actually I am new to Java development. I found Spring is really helpful for rapid development.

Please tell me the links or other Study materials on database [insert/update/delete]
in Java using Spring.
I have to code for Oracle.

Also I would like to know how Spring 3.2 (Java) help us in managing the xml (i.e., reading, writing or modification)?


Actually I am trying to call queryForInt() method but it displays NULL exception. When I acces the dB with same credential using Following Code:
DriverManagerDataSource dataSource = new DriverManagerDataSource();

------ In Bean -----------------
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <property name="url" value="jdbc:oracle:thin:@localhost:1521:xe"/>
        <property name="username" value="userName"/>
        <property name="password" value="pwd"/>
    <!-- DAOS -->
    <bean id="ProductDAO" class="br.edeploy.voive.dao.ProductDAO">
        <property name="dataSource" ref="dataSource"/>

---------On ProductDAO Class --------------

  int i = getSimpleJdbcTemplate().queryForInt("Select * from ERP_PRODUCT", "");
catch(DataAccessException dax)
      throw new Exception("Error: "+dax.getMessage());

Posted 15-Oct-12 0:40am
Updated 15-Oct-12 22:47pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Spring works fine with hibernate: Spring Hibernate Integration Tutorial[^]

Have you seen the Spring Website?[^]. Also great source.

and RoseIndia has always some to contribute:[^]
tusDev1 15-Oct-12 8:56am
Hi TorstenH.

Can you send me some links that describes specially Database Connectivity (with Oracle) in spring?
I have found some for xml, but I don't think spring provides functionality for managing the xml files.

but Thanks anyways.
TorstenH. 15-Oct-12 9:05am
Please do some research yourself.
Oracle provides the database system and is also the provider of Java core development, so database connection should be just about perfect.
Starting with Java and directly jumping into Spring development is a tough one.
So do it step by step:

- create some "playground application"
- create some facade
- create a simple local database
- access local database
- set up spring framework
- access spring framework
- set up remote database
- access remote database
- ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 16 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100