Many people always have this problem during package guide when learning java to connect to MySQL database
The package java.sql is not accessible
This problem is a problem with the Java version. Since java9, Java has become modular. You need to declare the use of the module package in the module file, otherwise you can’t find the class.
In module-info.java Add requires java.sql; Just
So the problem is solved
Read More:
- An error is reported during Java operation due to the problem of static resource export
- An import error is reported in the python. The solution to setting. Pylintrc is invalid
- Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the
- When using idea to start a project, an error is reported: Error:java : Compilation failed: internal java compiler error
- Uniapp uses CMD to import uview. An error is reported, and the file search fails: ‘uview UI’‘
- An error was reported when idea compiles Java: no symbol was found_ How to solve this problem
- When the mybatis field contains an expression, an error is reported when it is stored in the database
- An error of 500 is reported when an item is assigned to a role
- SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error] with root
- An error 1064 is reported when pymysql accesses the image
- Pikachu vulnerability is installed in the shooting range, and an error is reported when connecting to the MySQL database
- Solve the problem caused by: java.sql.SQLRecoverableException : IO error: connection reset related problems
- When the springcloud obtains the cloud link database information, an error is reported: errorcode 1045, state 28000
- When the spring MVC project is running on idea, an error is reported when the controller is a null pointer
- [error handling] when logging into MySQL with CentOS command, an error 1045 (28000) is reported
- MySql 8.x java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
- After Vue is packaged, a blank page appears, an error is reported in the resource request, and there is no error handling scheme
- An error is reported when the less file is introduced into main.js
- Using the TP framework, an error is reported sqlstate [08004] [1040] too many connections
- An error is reported when the file in hive parquet format is written in the Flink connection