JNDI DataSource Connection using Spring
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, April 14, 2008 09:30 AM

Hi folks, While configuring the JNDI setting in beans.xml, we are getting the follwoing exception. 14:03:41,452 INFO [STDOUT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcTemplate' defined in class path resource [beans.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.jndi.JndiObjectFactoryBean] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [o   More>>

Hi folks,

While configuring the JNDI setting in beans.xml, we are getting the follwoing exception.

14:03:41,452 INFO [STDOUT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdbcTemplate' defined in class path resource [beans.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.springframework.jndi.JndiObjectFactoryBean] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.springframework.jndi.JndiObjectFactoryBean] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
14:03:41,467 INFO [STDOUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1201)
14:03:41,467 INFO [STDOUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:940)
14:03:41,467 INFO [STDOUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)
14:03:41,467 INFO [STDOUT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)

My beans.xml file contains the following entries pertaining to the configurations:














Note that here ExpandJdbcTemplateImpl is my user -defined class where i have a property called JdbcTemplate jt. ALso, i have configured the datasource in jboss server(the IDE that i am using for development).


please help me resolve this issue.

regards,
Kalyan

   <<Less
About | Sitemap | Contact