Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2003
    Posts
    78

    Red face Unanswered: db2 type 4 driver datasource problem

    Hello,

    I was trying to specify db2 datasource in wsad use type 4 driver.
    Here is the configuration:
    implementation class: com.ibm.db2.jcc.DB2SimpleDataSource
    classpath: ${DB2_JDBC_DRIVER_PATH}/db2jcc.jar
    variable DB2_JDBC_DRIVER_PATH = C:\Program Files\IBM\SQLLIB\java
    datasource name: testDB2
    JNDI name: jdbc/testDB2
    resource properties:
    databasename: sample
    server name: localhost
    portnumber: 50000
    driver type: 4

    But when I tried to get the Datasource through a java class, it shows me the following error:
    ConnectionFac E J2CA0036E: An exception occurred while invoking method setDataSourceProperties on com.ibm.ws.rsadapter.spi.WSManagedConnectionFactor yImpl used by resource jdbc/testDB2 : java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSCredential
    .....

    The documents proves that wsad 5.0.1 is fine with db2 type 4 driver. Where am I wrong?

    Thanks in advance

  2. #2
    Join Date
    Jul 2003
    Posts
    78

    Unhappy please, any body check this problem! thanks

    Did anyone had the same experience for the datasource configuration in wsad 5.0.1? Thanks

  3. #3
    Join Date
    Aug 2003
    Posts
    5

    Re: please, any body check this problem! thanks

    Originally posted by christine2003
    Did anyone had the same experience for the datasource configuration in wsad 5.0.1? Thanks
    Sounds like your test server can't find the file. That's usually a classpath problem. If you right-click on yor server, open properties, and select the path option, you should be able to designate the db2jcc.jar file there.

  4. #4
    Join Date
    Aug 2003
    Posts
    2

    Re: db2 type 4 driver datasource problem

    Hi,

    Even I have encountered the same problem.

    Download jgss.jar from http://www.mcs.anl.gov/~gawor/downloads/jgss.jar

    and set the jar file in your class path.


    Originally posted by christine2003
    Hello,

    I was trying to specify db2 datasource in wsad use type 4 driver.
    Here is the configuration:
    implementation class: com.ibm.db2.jcc.DB2SimpleDataSource
    classpath: ${DB2_JDBC_DRIVER_PATH}/db2jcc.jar
    variable DB2_JDBC_DRIVER_PATH = C:\Program Files\IBM\SQLLIB\java
    datasource name: testDB2
    JNDI name: jdbc/testDB2
    resource properties:
    databasename: sample
    server name: localhost
    portnumber: 50000
    driver type: 4

    But when I tried to get the Datasource through a java class, it shows me the following error:
    ConnectionFac E J2CA0036E: An exception occurred while invoking method setDataSourceProperties on com.ibm.ws.rsadapter.spi.WSManagedConnectionFactor yImpl used by resource jdbc/testDB2 : java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSCredential
    .....

    The documents proves that wsad 5.0.1 is fine with db2 type 4 driver. Where am I wrong?

    Thanks in advance

  5. #5
    Join Date
    Jul 2003
    Posts
    78

    Unhappy Re: db2 type 4 driver datasource problem

    Thank you. But then I got the following error:

    E J2CA0046E: Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/DB2Test4, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA8101E: DataSource class cannot be used as one-phase: ClassCastException: com.ibm.db2.jcc.DB2SimpleDataSource

    I know type4 driver only available for one-phase, although I don't know what is one-phase mean. So is it supposed not to work at all?


    Thanks

    Originally posted by shanmou
    Hi,

    Even I have encountered the same problem.

    Download jgss.jar from http://www.mcs.anl.gov/~gawor/downloads/jgss.jar

    and set the jar file in your class path.

  6. #6
    Join Date
    Aug 2003
    Posts
    9

    Exclamation Wrong Class

    You use the wrong class.
    I don't know if it there in Type-4 Driver, but use the
    DB2ConnectionPoolDataSource class to be used as a
    Connection handler object when the factory instanciates
    the object.
    I don't know what the SimpleDataSource really is for,
    we never used.

  7. #7
    Join Date
    Aug 2003
    Posts
    2

    Type 4 Driver Connection Pooling

    Hi,

    I got the same problems you have mentioned. Let us isolate the problems one by one.

    1. Deployment using Websphere Application Server 5.0
    Connection Pooling Type 4 Driver is supported only from WAS 5.0.2
    Applying a fix-pack available online will upgrade WAS 5.0 to WAS 5.0.2.

    2. Development & Deployment in WSAD Test Environment itself:
    The test server in WSAD 5.0 is compatible with WAS 5.0. So typically the Type 4 driver connection Pooling would not work in WSAD 5.0. WSAD 5.1 is compatible with WAS 5.0.2 So it would work in WSAD 5.1

    A Common point to be noted in both cases is while configuring the JDBC Providers in the AppServer, configure at the scope of the server and not at cell / Node level. In WAS 5.0.2 if a new JDBC Provider is about to be added the Combo box will contain the DB2 Universal JDBC Driver Provider.
    The Java classname of the JDBC driver implementation will appear as com.ibm.db2.jcc.DB2ConnectionPoolDataSource by default. Do not use any other implementation. Then proceed with the configuration of the data sources. Also do not use Data Source Version 4.

    Any problems regarding this, feel free to contact me at shanmou@rediffmail.com

  8. #8
    Join Date
    Oct 2003
    Posts
    4
    I had the same problem yesterday using Webpshere studio 5.0.

    There is nothing wrong with the application. It is just that a specific configuration needs to be set.

    For ejb 1.1 in WSAD 4.0 you had to set the user/password when you created the datasource (ie. datasource v4). However, in WSAD 5.0, there is a new way of doing that (ie datasource v5).

    1. in the security tab of server configuration file, add a JAAS authenticaton entry that matches your database login.

    2. in the data source tab, edit the datasource to use the JAAS entry as authentication alias (whether component-manged or container-managed, i.e based on the ejb type(s) you are deploying).

    If you look at your error log, you will notice that the source of the failure is at the jdbc driver complaining of authentication issues.


    That all!
    Last edited by sam_thomas; 10-22-03 at 07:34.

  9. #9
    Join Date
    Jul 2003
    Posts
    78
    Thank you for reply. If you don't add JAAS, actually type 2 driver won't work either. But anyway, when I retrieve multi-resultset, the db2 still giving me sequence error. Do you have any idea about that?

    appreciated,
    christine

    Originally posted by sam_thomas
    I had the same problem yesterday using Webpshere studio 5.0.

    There is nothing wrong with the application. It is just that a specific configuration needs to be set.

    For ejb 1.1 in WSAD 4.0 you had to set the user/password when you created the datasource (ie. datasource v4). However, in WSAD 5.0, there is a new way of doing that (ie datasource v5).

    1. in the security tab of server configuration file, add a JAAS authenticaton entry that matches your database login.

    2. in the data source tab, edit the datasource to use the JAAS entry as authentication alias (whether component-manged or container-managed, i.e based on the ejb type(s) you are deploying).

    If you look at your error log, you will notice that the source of the failure is at the jdbc driver complaining of authentication issues.


    That all!

  10. #10
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    35
    I am not sure thast it is exactly your problem but in the past I solved many of similar problem by assuring that in my case the db2java.zip I was using on the client was the exact same as the one on the server ...

    HTH,

    Dany

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •