Announcement Announcement Module
No announcement yet.
BeanCreation Excepton Plz help Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • BeanCreation Excepton Plz help

    Dear all

    i am traying //this.npjt = new NamedParameterJdbcTemplate(dataSource);
    with context.xml

    <bean id="npjt" class="org.springframework.jdbc.core.namedparam.Na medParameterJdbcTemplate">
    <constructor-arg ref="portailCarburantDataSource"/>

    <bean id="commonJdbcTemplateTest" class=" bcTemplate">
    <property name="npjt" ref="npjt"></property>

    I am getting following excepton plz help

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'commonJdbcTemplateTest' defined in class path resource [com/carrefour/fr/portail/carburant/ejb-application-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedEx ception: Failed to convert property value of type 'org.springframework.jdbc.core.namedparam.NamedPar ameterJdbcTemplate' to required type 'org.springframework.jdbc.core.namedparam.NamedPar ameterJdbcTemplate' for property 'npjt'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.jdbc.core.namedparam.NamedPara meterJdbcTemplate] to required type [org.springframework.jdbc.core.namedparam.NamedPara meterJdbcTemplate] for property 'npjt': no matching editors or conversion strategy found
    Last edited by junugari; May 10th, 2011, 10:11 AM.

  • #2
    First of all remember to use the CODE tags when posting code/configuration/stacktraces.

    Failed to convert property value of type 'org.springframework.jdbc.core.namedparam.NamedPara meterJdbcTemplate' to required type 'org.springframework.jdbc.core.namedparam.NamedPara meterJdbcTemplate'

    The fact that Spring is trying to convert to objects of the same class means that the framework (and thus the application) doesn't recognize them to be the same class, which leads me to think this is a classloader issue. You probably have made a mistake in resolving and exporting your project dependencies (there is more than one spring-jdbc or spring-core jar, you're mixing up jars from different versions of Spring, etc.

    I suggest using Maven to manage your dependencies.


    • #3
      Great post! It's very nice. Thank you so much for your post.

      Watch Jumping the Broom Movie Online Free