Announcement Announcement Module
Collapse
No announcement yet.
BeanCreation Excepton Plz help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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>


    <bean id="commonJdbcTemplateTest" class="com.carrefour.fr.portail.carburant.CommonJd bcTemplate">
    <property name="npjt" ref="npjt"></property>
    </bean>

    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.

    Comment


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


      __________________
      Watch Jumping the Broom Movie Online Free

      Comment

      Working...
      X