关于数据库连接报错:Unable to load authentication plugin 'caching_sha2_password'.

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于数据库连接报错:Unable to load authentication plugin 'caching_sha2_password'.相关的知识,希望对你有一定的参考价值。

参考技术A 目前我所用的mysql 版本是:8.0.22,对应的 mysql-connector-java 版本为:5.1.41
因 MySql 8.x 的验证模块和5.x不同。

struts报错严重: Dispatcher initialization failed Unable to load configuration.

在使用struts编程时出现下例错误,总结网上解决方法,汇总如下


严重: Dispatcher initialization failed

Unable to load configuration.

报上面错误的原因有多种,得看后面提示是什么原因引起的,再动手解决。

*****************************************

情况一:

严重: Dispatcher initialization failed

Unable to load configuration. - action - file:/D:/Program%20Files/Tomcat7.0/webapps/sshtest1/WEB-INF/classes/struts.xml:8:83

......

......

Caused by: Action class [com.lib.action.Loginactionr] not found 

上面说struts.xml第8行出现错误,看后面提示说是Action class找不到,


解决方法:查看struts.xml中的第8行代码,看看类的包或类名是否正确


***********************************************

情况二:

严重: Dispatcher initialization failed

Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-6.0.29/webapps/myKj/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132

说明错误在struts-plugin.xml的第29行


解决方法:

这个是因为多加了struts2-spring-plugin-2.1.8.1.jar,这个包,没有用到spring的时候不要加。删掉



****************************************************

情况三:

严重: Dispatcher initialization failed

Unable to load configuration. - bean - jar:file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/Struts2Demo01/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:47:178



解决方法:

除了

commons-logging-1.0.4.jar

freemarker-2.3.12.jar

ognl-2.6.11.jar

struts2-core-2.1.2.jar

xwork-2.1.1.jar

这五个核心LIB要复制外,

commons-io-1.3.2.jar

commons-fileupload-1.2.1.jar

这两个Jar文件也必须放到指定目录





以上是关于关于数据库连接报错:Unable to load authentication plugin 'caching_sha2_password'.的主要内容,如果未能解决你的问题,请参考以下文章

ArcCatalog连接ArcSDE连接报:unable to create new database connection file,permission is denied

Navicat连接报错:cannot load OCI DLL,126

mysql连接报错

Mysql连接报错:1130-host ... is not allowed to connect to this MySql server如何处理

struts报错严重: Dispatcher initialization failed Unable to load configuration.

mysql连接报错 Lost connection to MySQL server at 'sending authentication information', system er