Hi, I'm very new to Hibernate and DB2.
Currently I'm using Spring 3 + Hibernate 4 Framework running in Tomcat 7 to do some job.
One data source is MS SQL 2008 R2, which I can manage to get the transaction successfully,
but the other data source is DB2 who holds Maximo 7, and I cann't get my transaction with this one.
hibernate settings are:
Code:
<bean id="maxDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver"/>
<property name="url" value="jdbc:db2://hostname:port/dbname"/>
<property name="username" value="admin"/>
<property name="password" value="password"/>
</bean>
<bean id="maxSessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="maxDataSource" />
<property name="configLocation">
<value>classpath:maxHibernate.cfg.xml</value>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.DB2Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.connection.pool_size">1</prop>
<prop key="hibernate.c3p0.min_size">1</prop>
<prop key="hibernate.c3p0.max_size">1</prop>
<prop key="hibernate.c3p0.timeout">5</prop>
<prop key="hibernate.c3p0.max_statements">50</prop>
</props>
</property>
</bean>
However, when publish my code, this error occured:
Quote:
............
Sep 19, 2012 7:17:03 PM org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
Sep 19, 2012 7:17:04 PM org.hibernate.engine.jdbc.internal.TypeInfoExtracter extractTypeInfo
WARN: HHH000362: Unable to retrieve type info result set : com.ibm.db2.jcc.a.SqlException: DB2 SQL Error: SQLCODE=-443, SQLSTATE=38553, SQLERRMC=SYSIBM.SQLGETTYPEINFO;GETTYPEINFO;SYSIBM:CLI:-805, DRIVER=4.3.85
Sep 19, 2012 7:17:04 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.DB2Dialect
Sep 19, 2012 7:17:04 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
Sep 19, 2012 7:17:04 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
..............
Any suggestion?
Waiting online, THANKS damn much!!!!!!!!!!!!!!!!!!