Topic
8 replies Latest Post - ‏2013-01-14T14:39:39Z by Sunit
secret007
secret007
6 Posts
ACCEPTED ANSWER

Pinned topic DGL7333A database connection failed

‏2013-01-09T04:30:10Z |
Hi,

I am developing one JAR which requires connection to Content Manager.
While connecting to Content Manager through CM java API, I am getting below error.

""com.ibm.mm.beans.CMBConnectFailedException: DGL7333A: The database connection failed due to an error in the DriverManager.getConnection() or the equivalent C++ method. The exception message was: jcct41020511234http://4.3.111 Null userid is not supported. ERRORCODE=-4461, SQLSTATE=42815 (STATE) : ; SERVER = DSCLS, USERID = , SQL RC = -4461, SQL STATE = 42815

com.ibm.mm.sdk.common.DKDatastoreAccessError: DGL7333A: The database connection failed due to an error in the DriverManager.getConnection() or the equivalent C++ method. The exception message was: jcct41020511234http://4.3.111 Null userid is not supported. ERRORCODE=-4461, SQLSTATE=42815 (STATE) : ; SERVER = DSCLS, USERID = , SQL RC = -4461, SQL STATE = 42815

at com.ibm.mm.sdk.server.DKDatastoreICM.connect(DKDatastoreICM.java:2092)
at com.ibm.mm.beans.CMBConnection.connect(CMBConnection.java:1722)""

As printed in the error user id is not actually non null value.
Why is it not able to recognize that non null value?
I am extremely stuck in this error.
DB2 CM version is 8.4.
Can anybody please help me?
~Secret007
Updated on 2013-01-14T14:39:39Z at 2013-01-14T14:39:39Z by Sunit
  • Sunit
    Sunit
    191 Posts
    ACCEPTED ANSWER

    Re: DGL7333A database connection failed

    ‏2013-01-09T14:15:42Z  in response to secret007
    Check your component managed authentication alias.

    • Sunit
    • secret007
      secret007
      6 Posts
      ACCEPTED ANSWER

      Re: DGL7333A database connection failed

      ‏2013-01-09T21:18:51Z  in response to Sunit
      Thanks Sunit, but component managed alias can be used with websphere.
      With the same Java CM API I was able to connect to CM DB2 v9.5.401.90(higher version), but it gave me above error when connecting to DB2 v8.1.16.429 (lower version)

      Can't Java CM API ignore the component managed alias when connecting to lower version?
      I am not willing to involve websphere server. Is Component based aliasing the only option?
      How to go for Component based aliasing ?
      • Sunit
        Sunit
        191 Posts
        ACCEPTED ANSWER

        Re: DGL7333A database connection failed

        ‏2013-01-10T19:29:41Z  in response to secret007
        As this is a WAS forum I assumed that you were using a JDBC datasource defined to WAS. Can you tell me how you have configured the credentials to access the DB2 CM database?

        --Sunit
        • secret007
          secret007
          6 Posts
          ACCEPTED ANSWER

          Re: DGL7333A database connection failed

          ‏2013-01-10T20:45:07Z  in response to Sunit
          oh ohk..sorry..
          I am trying to provide as much as information available below, you may ignore the information not needed.
          1. db2 authentication parameter in dbmcfg is set to client for client authentication with db2cmd.
          2. Trying to connect to db2 CM using Java API which I am running on windows server
          3. Windows server is SSO enabled (may be this information is not relevant)
          4. Created administrator account "adminUser" in system admin client on liabrary server.
          This user has all privileges and use system password.
          5. On the windows server, passing "adminUser" and it's password to Java API.
          6. On the windows server another administrator account "adminUser" is created in "My computers" having same credential as system admin client.

          Let me know if you need any other information.

          I am able to connect to higher version of DB2 CM using cmbdsk81.jar and cmb81.jar
          Will the old versions of cmbdsk81.jar and cmb81.jar connect to lower CM versions?
          • secret007
            secret007
            6 Posts
            ACCEPTED ANSWER

            Re: DGL7333A database connection failed

            ‏2013-01-11T04:55:27Z  in response to secret007
            Have used below link Java CM API to connect to CM DB connection
            http://pic.dhe.ibm.com/infocenter/cmgmt/v8r5m0/index.jsp?topic=%2Fcom.ibm.javabns.doc%2Fcom%2Fibm%2Fmm%2Fbeans%2FCMBConnection.html
            • Sunit
              Sunit
              191 Posts
              ACCEPTED ANSWER

              Re: DGL7333A database connection failed

              ‏2013-01-11T13:41:52Z  in response to secret007
              Are you using a connection pool?

              e.g.:

              CMBConnection connection = connectionPool.getConnection(userid, password);
              ..do some work....
              connectionPool.freeConnection(connection);
              If you are not using a pool but just creating a simple connection then the code should look something like:

              CMBConnection connection = new CMBConnection();
              connection.setDsType("ICM");
              connection.setServerName("icmnlsdb");
              connection.setUserid("icmuser1");
              connection.setPassword("pass");
              connection.connect();
              ..do some work...
              connection.disconnect();

              In either case user-id and password is specified. Can you confirm that your code looks something similar. Also verify that you can connect to CM outside of java code with the ID and Password.

              --Sunit
              • secret007
                secret007
                6 Posts
                ACCEPTED ANSWER

                Re: DGL7333A database connection failed

                ‏2013-01-11T17:24:34Z  in response to Sunit
                Thanks again Sunit!
                Yes. Code looks similar to this. I had tried both the options - simple connection and connection pool.
                Both of them are giving same error.

                Old DB2 CM is residing on the other server and there is another remote windows server I am trying run this code. I was able to connect to CM from CM server and remote windows server through CM System Admin Client.

                Some authentication parameter on CM db2 dbmcfg table is currently "client".
                What could be the issue?
                • Sunit
                  Sunit
                  191 Posts
                  ACCEPTED ANSWER

                  Re: DGL7333A database connection failed

                  ‏2013-01-14T14:39:39Z  in response to secret007
                  If authentication is SERVER, the user ID and password are sent from the client to the server so that authentication can take place on the server.

                  A value of CLIENT indicates that all authentication takes place at the client. No authentication needs to be performed at the server.

                  It is possible that you have not configured DB2 and/or DB2 Connect correctly.

                  • Sunit