In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Weblogic service to establish a data source connection test update mysql driver package of the problem and what is the solution, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
WebLogic is an application server produced by American Oracle Company. Specifically, it is a middleware based on JAVAEE architecture. WebLogic is a Java application server for developing, integrating, deploying and managing large-scale distributed Web applications, network applications and database applications. The dynamic function of Java and the security of Java Enterprise standard are introduced into the development, integration, deployment and management of large-scale network applications. The following describes the problems and solutions of weblogic service establishing data source connection test and updating mysql driver package.
1. Build mysql service
If necessary, please move to connect: Docker simply deploy mysql
2. The weblogic console sets up the data source and tests
Database type: MySQL; can keep everything else by default.
Keep the other steps by default, until the next step is to configure the connection.
Carry out the configuration test
Problem handling 1
The test failed, and the error is as follows
The error connection test failed.
Error Unable to load authentication plugin 'caching_sha2_password'.
Com.mysql.jdbc.SQLError.createSQLException (SQLError.java:910)
Com.mysql.jdbc.SQLError.createSQLException (SQLError.java:907)
Com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication (MysqlIO.java:1715)
Com.mysql.jdbc.MysqlIO.doHandshake (MysqlIO.java:1244)
Com.mysql.jdbc.ConnectionImpl.coreConnect (ConnectionImpl.java:2396)
Com.mysql.jdbc.ConnectionImpl.connectOneTryOnly (ConnectionImpl.java:2429)
Com.mysql.jdbc.ConnectionImpl.createNewIO (ConnectionImpl.java:2214)
Com.mysql.jdbc.ConnectionImpl. (ConnectionImpl.java:797)
Com.mysql.jdbc.JDBC4Connection. (JDBC4Connection.java:31)
Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
Sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
Java.lang.reflect.Constructor.newInstance (Constructor.java:423)
Com.mysql.jdbc.Util.handleNewInstance (Util.java:395)
Com.mysql.jdbc.ConnectionImpl.getInstance (ConnectionImpl.java:383)
Com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.java:334)
Weblogic.jdbc.common.internal.DataSourceUtil.testConnection0 (DataSourceUtil.java:340)
Weblogic.jdbc.common.internal.DataSourceUtil.access$000 (DataSourceUtil.java:22)
Weblogic.jdbc.common.internal.DataSourceUtil$1.run (DataSourceUtil.java:254)
Notice the first line (and generally the most important) Unable to load authentication plugin 'caching_sha2_password'.
Reason:
Different versions of authentication mechanisms are different.
Version 5.X: default_authentication_plugin=mysql_native_password
Version 8.x: default_authentication_plugin=caching_sha2_password
Resolve:
Log in to the mysql console and execute the command
View permissions and authentication mechanism commands: select host,user,plugin,authentication_string from mysql.user;ALTER USER 'root'@'%' IDENTIFIED BY' 12345 'PASSWORD EXPIRE NEVER; ALTER USER' root'@'%' IDENTIFIED WITH mysql_native_password BY '12345 commands; FLUSH PRIVILEGES;alter user' root'@'%' identified by '12345 permissions investors MySQL > ALTER USER' root'@'%' IDENTIFIED BY '12345' PASSWORD EXPIRE NEVER # modify the encryption rule Query OK, 0 rows affected (0.01 sec) mysql > ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY' 12345; # Update the user's password Query OK, 0 rows affected (0.00 sec) mysql > FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec) mysql > alter user 'root'@'%' identified by' 12345' # reset password Query OK, 0 rows affected (0.00 sec) problem handling 2
After performing the above operation, retest the connection
Java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
Com.mysql.jdbc.SQLError.createSQLException (SQLError.java:1058)
Class conversion exception, view mysql log information docker logs mysql
Mbind: Operation not permitted
Reason:
MySQL Database Server 8 was added as Source/Target authentication in ODI 12.2.1.4. Older versions of ODI 12c are not certified.
Resolve:
Upgrade to MySQL 8 certified Oracle Data Integrator version 12.2.1.4 or later.
Step 1: (guess if this step is optional, come down and test it yourself, I have done it)
1. Copy the driver package of mysql8 to the weblogic directory
/ home/weblogic/Oracle/Middleware/wlserver/server/lib/mysql-connector-java-8.0.22.jar
two。 Modify the weblogic_classpath= of the wlserver/common/bin/commEnv.sh file
Export weblogic_classpath= "/ home/weblogic/Oracle/Middleware/wlserver/server/lib/mysql-connector-java-8.0.22.jar"
Step 2: (feeling is the most important)
Copy the driver package to the domain's lib directory, such as / home/weblogic/Oracle/Middleware/user_projects/domains/basicWLSDomain/lib
Change the driver type to com.mysql.cj.jdbc.Driver
Connection testing, ok
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.