• 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

using a query() with RowMapper.

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using a "query() with RowMapper" and my code compiles but when i execute following output given in the place of data.



Oct 27, 2012 10:56:00 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader lo
adBeanDefinitions
INFO: Loading XML bean definitions from class path resource [spring.xml]
Oct 27, 2012 10:56:01 PM org.springframework.jdbc.datasource.DriverManagerDataSource setD
riverClassName
INFO: Loaded JDBC driver: oracle.jdbc.OracleDriver
Oct 27, 2012 10:56:01 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader lo
adBeanDefinitions
INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/sup
port/sql-error-codes.xml]
Oct 27, 2012 10:56:01 PM org.springframework.jdbc.support.SQLErrorCodesFactory <init>
INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, Postg
reSQL, Sybase]
 
Ranch Hand
Posts: 32
Netbeans IDE Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are your other operation with database working ? Can you post codes for connection ?
 
Ritesh raushan
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kr. Pallav wrote:Are your other operation with database working ? Can you post codes for connection ?



please help.

//spring.xml

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>
<bean id="id1" class="org.springframework.jdbc.datasource.DriverManagerDataSource" >

<property name="driverClassName" value="oracle.jdbc.OracleDriver" ></property>
<property name="url" value="jdbc : oracle:thin:@localhost:1521 : orcl"></property>
<property name="username" value="scott"></property>
<property name="password" value="tiger"></property>
</bean>

<bean id="id2" class="org.springframework.jdbc.core.JdbcTemplate" >
<property name="dataSource" ref="id1"/>
</bean>
<bean id="id3" class="Mybean">
<property name="jt" ref="id2"/>
</bean>
</beans>











 
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
You code looks ok at first glance. Can you post the error you are getting. Since spring is loading the error xml it indicates that it would some error in executing the SQL. Normally the next few lines tell what that error is ...
reply
    Bookmark Topic Watch Topic
  • New Topic