ORA-28040: No matching authentication protocol

使用hibernate+oracle数据库时报错,错误例如以下:

121 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA

147 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found

162 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist

189 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling

502 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml

503 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml

994 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/sina/domain/Message.hbm.xml

1457 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.sina.domain.Message -> Message

1706 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/sina/domain/Users.hbm.xml

1830 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.sina.domain.Users -> users

1841 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null

1844 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.sina.domain.Users.sendMessages -> Message

1845 [main] INFO org.hibernate.cfg.HbmBinder - Mapping collection: com.sina.domain.Users.getMessages -> Message

1894 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)

1894 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20

1895 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false

1968 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@127.0.0.1:1521:oracle12c

1968 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=c##test1, password=****}

2464 [main] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata

java.sql.SQLException: ORA-28040: No matching authentication protocol

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)

at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:288)

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)

at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)

at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)

at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)

at java.sql.DriverManager.getConnection(DriverManager.java:571)

at java.sql.DriverManager.getConnection(DriverManager.java:187)

at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)

at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)

at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)

at com.sina.util.HibernateUtil.<clinit>(HibernateUtil.java:17)

at com.sina.test.TestMain.main(TestMain.java:13)

2503 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle9Dialect

2508 [main] WARN org.hibernate.dialect.Oracle9Dialect - The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead

2517 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)

2521 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)

2521 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled

2522 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled

2523 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: disabled

2523 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled

2523 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto

2525 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1

2525 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled

2525 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled

2525 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled

2525 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory

2529 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory

2530 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}

2530 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled

2530 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled

2530 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled

2531 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory

2531 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled

2531 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled

2542 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout

2544 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled

2544 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled

2544 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo

2544 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled

2663 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory

3177 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured

3193 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update

3193 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata

3220 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not get database metadata

java.sql.SQLException: ORA-28040: No matching authentication protocol

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)

at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:288)

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)

at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)

at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)

at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)

at java.sql.DriverManager.getConnection(DriverManager.java:571)

at java.sql.DriverManager.getConnection(DriverManager.java:187)

at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)

at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)

at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:168)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)

at com.sina.util.HibernateUtil.<clinit>(HibernateUtil.java:17)

at com.sina.test.TestMain.main(TestMain.java:13)

3223 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not complete schema update

java.sql.SQLException: ORA-28040: No matching authentication protocol

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)

at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:288)

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)

at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)

at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)

at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)

at java.sql.DriverManager.getConnection(DriverManager.java:571)

at java.sql.DriverManager.getConnection(DriverManager.java:187)

at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)

at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)

at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:168)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)

at com.sina.util.HibernateUtil.<clinit>(HibernateUtil.java:17)

at com.sina.test.TestMain.main(TestMain.java:13)

No matching authentication protocol中文翻译过来就是没有匹配的身份认证协议

原来曾经用的orale是曾经的版本号。可是近期换了下oracle的版本号,可是对应的jar包没有变换。原来的jar包使用的版本号为oracle14.jar,

换了下罪行的ojdbc7.jar包就没报错了。

时间: 2024-10-17 10:44:05

ORA-28040: No matching authentication protocol的相关文章

【故障处理】ORA-28040: No matching authentication protocol

1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 告警日志中频繁出现Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.ORA-28040: No matching authentication protocol错误,9i的客户端连接到12c高版本的解决方案 ② Windows下使用oerr命令

oracle12cORA-28040: No matching authentication protocol错误

报错信息: 用了oracle12c之后项目部署登陆后报错具体错误: DBCP borrowObject failed: java.sql.SQLException: ORA-28040: No matching authentication protocol 处理方式: 在oracle数据库所在的机器上面的$ORACLE_HOME/network/admin/sqlnet.ora文件,如果没有可以创建一个新的,加入下面的参数 SQLNET.ALLOWED_LOGON_VERSION=8

ORACLE12c ORA-28040: No matching authentication protocol

刚使用orcle,在官网上下载的最新版,在使用Oracle SQL Handler[点击进入官网 下载]连接时,提示:ORA-28040: No matching authentication protocol ORA-28040: 没有匹配的验证协议. 通过查找资料找到了好的解决方案.可以不需要到官网上下载新的驱动来解决问题. 方法:在Oracle的安装路径下找到sqlnet.ora文件.(我的安装路径F:\app\cl\product\12.1.0\dbhome_1\NETWORK\ADMI

No matching authentication protocol

java 连接oracle数据库: 之前连接公司的oracle数据库没有问题,但客户提供的是oracle12C版本的,连接就报 :No matching authentication protocol 查了网络上给出的解决方案,说是在oracle安装目录修改配置文件或是使用安装目录中的jar包,但数据库服务我们只能访问,不能修改任何配置文件. 后经过更改oracle的jar包,连接成功.注意,连接字符串也发生改变: 更改后的->jdbc:oracle:thin:@//10.226.95.156:

java.sql.SQLException: ORA-28040: No matching authentication protocol

使用FineReport连接Oracle时,出现如下日志: 严重:java.sql.SQLException: ORA-28040: No matching authentication protocol at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at com.fr.dav.LocalEnv.testConnect

vc++&gt;&gt;Connection using old (pre-4.1.1) authentication protocol refused (client option &#39;secure_auth&#39; enable

用VC来连接远程MYSQL时,出现如标题一样的错误,网上搜索了此错误产生的原因,最后自己找到了解决办法. 此错误产生的原因: 异常原因在于服务器端的密码管理协议陈旧,使用的是旧有的用户密码格式存储:但是客户端升级之后采用了新的密码格式.mysql5.6版本遇到这种不一致的情况就会拒绝连接. 详见mysql手册“Server Command Options”一节中“--secure-auth"选项的说明:http://dev.mysql.com/doc/refman/5.6/en/server-o

mysql连接错误解决(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option &#39;secure_auth&#39; enabled))

当使用mysql的新版本是,连接老版本的mysql,就会有可能报: ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)这个错误. 异常原因在于服务器端的密码管理协议陈旧,使用的是旧有的用户密码格式存储:但是客户端升级之后采用了新的密码格式.mysql新版本遇到这种不一致的情况就会拒绝连接. 所以在连接是:

Navicat连接Mysql报错:Client does not support authentication protocol requested by server;

上篇刚写了安装Mysql,想用Navicat去连接,然后就报错了,此处记录报错解决. Navicat连接MySQL Server8.0版本时出现Client does not support authentication protocol requested  by server:解决如下: 命令如下: 1.use mysql; 2.alter user 'root'@'localhost' identified with mysql_native_password by '********';

【已解决】使用Navicat连接MySQL数据库时报错Client does not support authentication protocol requested by server; consider upgrading MySQL client

报错缘由: 起初在验证一个mybatis的demo时提示"Error querying database"(见下方完整代码),找了很多方法没有解决,最后在贴吧找到答案.错误原因是安装mysql时Authentication Method选择了第一种强加密方法,改成第二种问题就解决了. 解决方法: 打开mysql安装程序(或者重装,但是重装很麻烦),重新配置MySQL Server 配置Authentication Method这一步时,选择第二种加密方法,重新打开Navicat,问题解