If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Connection authorization failure occurred. Reason: Security mechanism not supported.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-10, 00:21
SUSHMA50 SUSHMA50 is offline
Registered User
 
Join Date: Dec 2009
Posts: 10
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
Reply With Quote
  #2 (permalink)  
Old 01-20-10, 06:39
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On