Announcement Announcement Module
Collapse
No announcement yet.
DataSource configuration websphere 6 problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DataSource configuration websphere 6 problem

    I get the following exception when I configure the data source for Websphere. My test client is a simple spring application.

    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [javax.naming.Reference] to required type [javax.sql.DataSource] for property 'dataSource'

    I looked up the messages to see if anybody had fixed this issue and I did not find any.

    My applicationContext.xml has
    <bean id="dataSource1" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName"><value>jdbc/oraPool</value></property>
    <property name="jndiEnvironment">
    <props>
    <prop
    key="java.naming.factory.initial">com.ibm.webspher e.naming.WsnInitialContextFactory</prop>
    <prop
    key="java.naming.provider.url">iiop://localhost:2809</prop>
    </props>
    </property>
    </bean>

    <bean id="userTransaction" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName">
    <value>jta/usertransaction</value>
    </property>

    <property name="jndiEnvironment">
    <props>
    <prop
    key="java.naming.factory.initial">com.ibm.webspher e.naming.WsnInitialContextFactory</prop>
    <prop
    key="java.naming.provider.url">iiop://localhost:2809</prop>
    </props>
    </property>
    </bean>

    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTran sactionManager">
    <constructor-arg ><ref bean="userTransaction"/></constructor-arg>
    </bean>

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">

    <property name="dataSource"><ref local="dataSource1"/></property>

    <!-- Must references all OR mapping files. -->

    <property name="mappingResources">

    <list>
    <value>Process.hbm.xml</value>
    <value>Task.hbm.xml</value>
    </list>

    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">org.hibernate.dialect.Orac le9Dialect</prop>
    <prop key="hibernate.hbm2ddl.auto">update</prop>
    <prop key="hibernate.show_sql">true</prop>
    <prop key="hibernate.cglib.use_reflection_optimizer">tru e</prop>
    <prop key="hibernate.cache.provider_class">org.hibernate .cache.HashtableCacheProvider</prop>
    </props>
    </property>
    </bean>

    Did anybody face this issue and resolve it.
    Any help is appreciated.

    Thanks
Working...
X