Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3283450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:02:35+00:00 2026-05-17T20:02:35+00:00

I trying to configure an XA DB2 DataSource, xa-datasource (based on http://community.jboss.org/wiki/SetUpADB2Datasource ) using

  • 0

I trying to configure an XA DB2 DataSource, xa-datasource (based on http://community.jboss.org/wiki/SetUpADB2Datasource) using com.ibm.db2.jcc.DB2XADataSource class (local-tx-datasource works using the com.ibm.db2.jcc.DB2Driver). The target server is DB2 Connect V9.7

Actual xa-datasource config:

<xa-datasource>
    <jndi-name>jdbc/DB2ServerDS</jndi-name>
    <use-java-context>false</use-java-context>
    <track-connection-by-tx>true</track-connection-by-tx> 
    <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:db2://db2server:50000/FINDB</xa-datasource-property>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter</exception-sorter-class-name>
    <xa-datasource-property name="DriverType">4</xa-datasource-property>
    <check-valid-connection-sql>SELECT * FROM ACC.SETTINGS 1=2</check-valid-connection-sql>
    <user-name>findbuser</user-name>
    <password>findbuser</password>
    <min-pool-size>2</min-pool-size>
    <max-pool-size>10</max-pool-size>
    <blocking-timeout-millis>10000</blocking-timeout-millis>
    <type-mapping>DB2</type-mapping>
    <no-tx-separate-pools/>
</xa-datasource>

and the following jar in the JBoss node lib directory:

db2umplugin.jar         
db2policy.jar           
db2dbgm.jar             
db2jcc_license_cu.jar   
db2jcc.jar              
db2jcc4.jar             
db2java.zip             
db2jcc_license_cisuz.jar

but i’m getting the error:

Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.57.82] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null

The driver for XA is trying to use native libraries, despite the fact that i’m using a JDBC Type 4 driver.

Why is the driver trying to use native libraries? Is there anything i need to add to my config?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:02:36+00:00Added an answer on May 17, 2026 at 8:02 pm

    The solution is not to use the URL to specify the connection settings.

    <xa-datasource>
        <jndi-name>jdbc/DB2ServerDS</jndi-name>
        <use-java-context>false</use-java-context>
        <track-connection-by-tx>true</track-connection-by-tx> 
        <xa-datasource-class>com.ibm.db2.jcc.DB2XADataSource</xa-datasource-class>
        <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DB2ExceptionSorter</exception-sorter-class-name>
        <xa-datasource-property name="ServerName">db2server</xa-datasource-property>
        <xa-datasource-property name="PortNumber">50000</xa-datasource-property>
        <xa-datasource-property name="DatabaseName">FINDB</xa-datasource-property>
        <xa-datasource-property name="DriverType">4</xa-datasource-property>
        <xa-datasource-property name="User">findbuser</xa-datasource-property>
        <xa-datasource-property name="Password">findbuser</xa-datasource-property>
        <xa-datasource-property name="DriverType">4</xa-datasource-property>
        <check-valid-connection-sql>SELECT * FROM ACC.SETTINGS 1=2</check-valid-connection-sql>
        <user-name>findbuser</user-name>
        <password>findbuser</password>
        <min-pool-size>2</min-pool-size>
        <max-pool-size>10</max-pool-size>
        <blocking-timeout-millis>10000</blocking-timeout-millis>
        <type-mapping>DB2</type-mapping>
        <no-tx-separate-pools/>
    </xa-datasource>
    

    Credit to http://dev.wavemaker.com/forums/?q=node/3127

    The correct JARs are

    db2jcc_license_cu.jar             
    db2jcc4.jar                         
    db2jcc_license_cisuz.jar
    

    Should you get an error like:

    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-5042, SQLSTATE=     , SQLERRMC= ;1208;FINDBUSER;FINDB;QDB2; ; ; ;1208; , DRIVER=4.7.85)
    

    check http://www-01.ibm.com/support/docview.wss?uid=swg21405243&myns=swgimgmt&mynp=OCSSEPGG&mync=R for the solution.

    I hope this saves others some frustration and time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to configure a network connection using ConfigurationManager.ProcessConfiguration, with the configuration file
I'm trying to configure a dedicated server that runs ASP.NET to send mail through
I'm trying to configure the Quick Launch menu to only display the ancestors and
I'm trying to configure Windows Powershell to work with Visual Studio. Nothing fancy, just
I'm trying to configure NAnt to automate my build process - once I've got
I am trying to configure Reporting Services 2005SP2 on a machine with SQL 2008
I'm trying to configure Apache to allow read only access and ask for user
I am trying to configure the website SSL port with the certificate for a
I'm trying to configure an installer for some software we use within the company.
I am trying to configure Cruise Control with Nunit for reporting purpose. But I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.