By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,021 Members | 912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,021 IT Pros & Developers. It's quick & easy.

Error in java while getting connected to DB2

P: 1
Hello,
I was trying to get connected to DB2 from java using a Atomikos datasource.
This is the config for the same;
<bean id="dataSourceAtom1"
class="com.atomikos.jdbc.SimpleDataSourceBean" init-method="init"
destroy-method="close">
<property name="uniqueResourceName">
<value>TestDB2</value>
</property>
<property name="xaDataSourceClassName">
<value>com.ibm.db2.jcc.DB2XADataSource</value>
</property>
<property name="xaDataSourceProperties" value="serverName=localhost;portNumber=50001;datab aseName=testdb2;user=db2admin;password=Pass123$$;" />
<property name="exclusiveConnectionMode">
<value>true</value>
</property>
</bean>
It throws;
com.ibm.db2.jcc.b.SqlException: Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: db2jcct2 (Not found in java.library.path)
I have the db2jcc.jar and db2jcc_license_cisuz.jar file in the classpath and it works fine with the url: jdbc:db2://localhost:50001/testdb2.
I think it has something to do with the xaDataSourceProperties. Can anyone help here. Thanks
Sep 20 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.