0 Replies Latest reply on Feb 12, 2009 4:31 AM by waimeng72

    Need Help: Issues with Deploying with Spring and Hibernate

    waimeng72

      Hello All,

      I am new to JBoss am porting an Application Running in Weblogic to JBoss developed with SpringFramework.

      I have created a JNDI in JBoss and when I tried to deploy my application, the following error shows up

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.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.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource' nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
      Caused by:org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are: PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found Caused by:
      java.lang.IllegalArgumentException: Cannot convert value of type org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found


      Sorry for the lengthy excerpt from my logs, but I have highlighed what i think is the main error message.

      Below is an excerpt from the applicationContext.xml:

      <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName">
       <value>java:/jdbc/myDB</value>
       </property>
      </bean>


      I followed the guide and created a oracle-ds.xml and with a simple jsp successfully tested the connection to the Oracle Database. There were no errors when running this simple test page in the console and the above-mentioned errors only started showing up when i deployed the war file I am attempting to port to JBoss.

      I was wondering if someone could give me some hints as to what i should do? I have searched the web but could not find any inkling on how to resolve this. Many thanks in advance.