简体   繁体   English

ORA-28040:无身份验证协议

[英]ORA-28040: No Authentication protocol

I am trying to connect to remote DB via simple JDBC but i am getting below 我正在尝试通过简单的JDBC连接到远程数据库,但是我在下面

error:
 *** SQLException caught ***
ORA-28040: No matching authentication protocol

code : 代码:

import java.sql.*; 
import oracle.jdbc.*;
import java.io.*;
import oracle.jdbc.pool.OracleDataSource;

public class JDBC {

public static void main (String args []) throws SQLException {
    try
    {

       //Connecting to Oracle server
    OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();
    ds.setURL("jdbc:oracle:thin:@remotehostname:1521:dbname");
    Connection conn = ds.getConnection("my username", "my password");
    System.out.println("Connected to DB");
    }
    catch (SQLException ex) { System.out.println ("\n*** SQLException 
 caught ***\n" + ex.getMessage());}
     catch (Exception e) {System.out.println ("\n*** other Exception  caught ***\n");}
 }
} 

I have added ojdbc6.jar and all supporting jars to build path. 我添加了ojdbc6.jar和所有支持的jar来构建路径。 I am able to connect to remote via VPN but not via JDBC .. any guidance much appreciated... 我能够通过VPN而不是通过JDBC连接到远程..任何指导表示赞赏...

From docs.oracle.com If the client version does not meet or exceed the value defined by SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter(sqlnet.ora file), then authentication fails with an ORA-28040: No matching authentication protocol error or an ORA-03134: Connections to this server version are no longer supported error. 来自docs.oracle.com如果客户端版本未达到或超过SQLNET.ALLOWED_LOGON_VERSION_SERVER参数(sqlnet.ora文件)定义的值,则认证失败并显示ORA-28040:无匹配的认证协议错误或ORA-03134:不再支持与此服务器版本的连接错误。

You can check your driver version using below command 您可以使用以下命令检查驱动程序版本

$java -jar ojdbc6.jar -getversion

Try setting SQLNET.ALLOWED_LOGON_VERSION_SERVER in sqlnet.ora file to lower Oracle version like 8,9 or 10 . 尝试将sqlnet.ora文件中的SQLNET.ALLOWED_LOGON_VERSION_SERVER设置为较低的Oracle版本,例如8,9或10。

Check this issue for more info. 检查此问题以获取更多信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ORA-28040: 没有匹配的身份验证协议 Oracle - ORA-28040: No matching authentication protocol Oracle 无法获得JDBC连接。 嵌套异常为java.sql.SQLException:ORA-28040:Spring Batch中没有匹配的身份验证协议 - Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-28040: No matching authentication protocol in Spring Batch ORA-28040:与oracle12c一起使用groovy.sql包时,没有匹配的身份验证协议异常 - ORA-28040: No matching authentication protocol exception when using groovy.sql package with oracle12c 尽管更新了 OJDBC,但 Eclipse 项目 ORA-28040 异常 - Eclipse Project ORA-28040 Exception Despite Updated OJDBC 如何在Java中获取密钥交换和认证协议 - How to get the key exchange and authentication protocol in Java Java中的https协议和基本身份验证问题 - Problems with https protocol and Basic Authentication in java 支持多因素身份验证的扩展身份验证协议 - Spread authentication protocol that supports multi-factor authentication Spring Batch-ORA 12516 SQLState 66000-TNS:Listener无法使用具有匹配协议栈的处理程序 - Spring Batch - ORA 12516 SQLState 66000 - TNS:Listener could not available handler with matching protocol stack ORA-03106:批处理更新中的致命两任务通信协议错误 - ORA-03106: fatal two-task communication protocol error in batch update 无法从Java连接到Oracle DB - ORA-12560:TNS:协议适配器错误 - Cannot connect to Oracle DB from Java - ORA-12560: TNS:protocol adapter error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM