Beginner |
|
Joined: Tue Sep 02, 2003 3:25 pm Posts: 21 Location: Kingston Jamaica, West Indies
|
I am using spring and hibernate together and have set up two datasources.
One to db2 and the other informix
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingResources">
<list>
<!-- Licensing Mappings -->
<value>/resources/hibernate/mappings/licensing/ApplicationFee.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.connection.datasource">jdbc/lmis_dev</prop>
<prop key="hibernate.default_schema">LICENSING</prop>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.DB2Dialect</prop>
<prop key="hibernate.user_outer_join">true</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.query.substitutions">true=Y, false=N</prop>
</props>
</property>
<!--<property name="dataSource"><ref bean="lmisDataSource"/></property>-->
</bean>
<bean id="trnSessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="mappingResources">
<list>
<value>/resources/hibernate/mappings/reference-codes/trn-reference-codes.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.connection.datasource">jdbc/trn_dev</prop>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.InformixDialect</prop>
<prop key="hibernate.connection.readOnly">true</prop>
</props>
</property>
<!--<property name="dataSource"><ref bean="trnDataSource"/></property>-->
</bean>
When i run the server i get this exception
net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.InformixDialect
[9/10/03 12:49:43:328 GMT-05:00] 66ff99cb NamingHelper I net.sf.hibernate.util.NamingHelper JNDI InitialContext properties:{}
[9/10/03 12:49:43:391 GMT-05:00] 66ff99cb DatasourceCon I net.sf.hibernate.connection.DatasourceConnectionProvider Using datasource: jdbc/trn_dev
[9/10/03 12:49:43:391 GMT-05:00] 66ff99cb SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl Use outer join fetching: false
[9/10/03 12:49:44:891 GMT-05:00] 66ff99cb FreePool E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/trn_dev, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: Read only mode not supported.
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:251)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:125)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.initializeConnectionProperties(WSRdbManagedConnectionImpl.java:584)
|
|