zoukankan      html  css  js  c++  java
  • 解决Java连接Oracle 12c存在的问题

    感谢作者

    原文链接:https://blog.csdn.net/peng_wei_kang/article/details/80403486

    1.发现项目报以下错误:

    1.  
      Caused by: java.sql.SQLException: ORA-28040: 没有匹配的验证协议
    2.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    3.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
    4.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
    5.  
      at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:427)
    6.  
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    7.  
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    8.  
      at oracle.jdbc.driver.T4CTTIoauthenticate.doOSESSKEY(T4CTTIoauthenticate.java:390)
    9.  
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:356)
    10.  
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
    11.  
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
    12.  
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
    13.  
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)

     

    解决方法:

    在oracle安装目录下的product12.2.0dbhome_1 etworkadminsqlnet.ora文件中新增一行,内容如下:

    SQLNET.ALLOWED_LOGON_VERSION=8

    SQLNET.ALLOWED_LOGON_VERSION=8

    接着重启项目。

    2.遇到以下错误:

    1.  
      Caused by: java.sql.SQLException: ORA-01017: 用户名/口令无效; 登录被拒绝
    2.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    3.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
    4.  
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
    5.  
      at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
    6.  
      at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
    7.  
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    8.  
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    9.  
      at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
    10.  
      at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
    11.  
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
    12.  
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
    13.  
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)

    我确定账号密码没有错误,用sqlplus以及sql developer都可以连接,但通过项目连接就存在这个问题。

    解决问题:

    通过管理员账号重新去修改一下当前账号的密码为原来的密码

    1.  
    2. SQL< conn system/root;  (注意:此处是使用自己的管理员账号和密码去连接)
    3. SQL< alter user c##ansibee identified by ansibee;
    4.  
  • 相关阅读:
    discuz 门户功能增加自定义keywords字段
    discuz的门户文章页中增加百度分享代码
    discuz 门户页模板中的keywords和description不能正常显示
    windows下python的安装
    discuz 取消门户首页url中的portal.php
    网站被跳转到联通域名无法访问页面
    DedeCms密码解密[转]
    last error : SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate veri
    [转]解决MySQL出现大量unauthenticated user的问题
    ImageUtils
  • 原文地址:https://www.cnblogs.com/ansibee/p/9656638.html
Copyright © 2011-2022 走看看