Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    10

    Unanswered: Connection authorization failure occurred. Reason: Security mechanism not supported.

    Hi,
    I am trying to connect to DB2 using JDBC. I have set the following properties in my code.
    1) properties.put("securityMechanism",new String(""+ com.ibm.db2.jcc.DB2BaseDataSource.ENCRYPTED_USER_A ND_PASSWORD_SECURITY+ ""));
    2) properties.put("encryptionAlgorithm", new String("2"));

    I am using JDK 1.5 and also have following jars

    1) db2jcc.jar
    2) db2jcc-license.jar
    3) US_export_policy.jar
    4) local_policy.jar

    However when I try to connect to the database I am getting the following error

    Exception in thread "main" com.ibm.db2.jcc.am.po: jcct420111237http://3.58.82 Connection authorization failure occurred. Reason: Security mechanism not supported. ERRORCODE=-4214, SQLSTATE=28000
    at com.ibm.db2.jcc.am.ed.a(ed.java:674)
    at com.ibm.db2.jcc.am.ed.a(ed.java:60)
    at com.ibm.db2.jcc.am.ed.a(ed.java:120)
    at com.ibm.db2.jcc.t4.b.p(b.java:2023)
    at com.ibm.db2.jcc.t4.b.a(b.java:1557)
    at com.ibm.db2.jcc.t4.db.b(db.java:3415)
    at com.ibm.db2.jcc.t4.db.a(db.java:336)
    at com.ibm.db2.jcc.t4.db.a(db.java:112)
    at com.ibm.db2.jcc.t4.b.m(b.java:1239)
    at com.ibm.db2.jcc.t4.b.b(b.java:1112)
    at com.ibm.db2.jcc.t4.b.c(b.java:704)
    at com.ibm.db2.jcc.t4.b.b(b.java:686)
    at com.ibm.db2.jcc.t4.b.a(b.java:367)
    at com.ibm.db2.jcc.t4.b.<init>(b.java:307)
    at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection( DB2SimpleDataSource.java:214)
    at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:4 56)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at JDBCConnectivity.EncryptionConnectivity.main(Encry ptionConnectivity.java:34).

    Can anyone kindly suggest me a solution

    Regards
    Siddharth Shah

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by SUSHMA50 View Post
    Can anyone kindly suggest me a solution
    Use the mechanism that's supported by the configured server authentication type. Ask your DBA what it is.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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