Tag Archives: intellij-idea

[Solved] Errorjava Compilation failed internal java compiler error

Error Messages:

Errorjava Compilation failed internal java compiler error

 

Solution:

1. view the project’s jdk (Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings ->Project

2, view the project’s jdk (Ctrl+Alt+shift+S)
File ->Project Structure->Project Settings -> Modules -> (Name of the project to be modified) -> Sources ->

3. View Java configuration in idea
File ->Setting ->Build,Execution,Deployment -> Compiler -> Java Compiler

If the above three steps still fail
Clear IDEA cache Restart IDEA
File->Invalidate Caches/Restart

How to Solve c3p0 error (Cause & Solution)

Error Cause & Solution:
1. Configuration is wrong: driver=com.mysql.jdbc.Driver.
2. Wrong database connection address: url=jdbc:mysql://localhost:3306/test (test is user-defined creation, variable).
3. Wrong password or account: username=root (default is root).
4. Wrong account: password=root (password is set by the user).
5. The database is not started or not authorized to access.
6. The corresponding driver jar package mysql-connector-java-5.1.6-bin.jar has not been introduced, or the mysql-connector-java dependency has not been injected in the Maven project.

IDEA Import Servlet Package Error [How to Solve]

When we use idea to import packages related to servlets, we sometimes encounter errors, which leads to the problem that servlets cannot recognize. In fact, the reason for the problem is very simple, that is, we can’t find packages related to servlets in JDK

Solution:
1. Find the installation directory of Tomcat, here is C:\Program Files\Apache Software Foundation\Tomcat 8.5\lib (Note: not everyone’s directory is this, need to be based on the actual situation of your computer’s installation directory), find the Servlet-api.jar This file, copy it

2. then go to the JDK installation directory: C:\Program Files\Java\jdk1.8.0_241\jre\lib\ext, find the ext folder, and then copy the Servlet-api.jar file just copied to this folder

3. Back to the idea, the problem is solved, if the idea is still reporting errors, restart the idea refresh

[Solved] IDEA2020 Error: Cannot resolve symbol ‘Servlet‘

Reason: no servlet-api.jar package

I tried all the methods on the Internet and found that it was the problem with my servlet-api.jar package

It was not placed under the Lib package of tomcat9. Another one was downloaded online and placed on disk D

Solution:

Right-click item — Open Module Settings

Libraries – + — Java – — find servlet-api.jar package, add it to the project, and click apply

(error) READONLY You can‘t write against a read only replica.

Because the master-slave replication cluster was configured before, the configuration was changed disorderly

There are two solutions:

1. Open the configuration file corresponding to the redis service, and change the value of the attribute slave read-only to no, so that it can be written.

2. Open the client mode through the redis cli command, and enter the slave of no one command

[Solved] Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.Mon Nov 15 20:44:52 CST 2021
There was an unexpected error (type=lnternal Server Error, status=500).
Could not open JPA Entity/Manager for transacton, nested exception is org.hibernate.exceptionGenericDBCException:
Unable to acquireJDBCConnection

During the debugging of idea, I encountered a problem on the browser side. I found it for many days and finally solved it. That is, the JDBC version of the connection between idea and MySQL does not match. Let’s share the method below
if you see an error, it is probably a JDBC connection problem. First, check the configured MySQL user name, password and URL

After making sure that everything is correct, check whether my MySQL version corresponds to the idea version. Before I made an error, the MySQL jar package in the idea is 5.0, but my idea version is higher than mysql, so I can’t connect. Then I go to the MySQL 8.0 jar package under the official website, import it into the idea, and then change the JDBC version in pom.xml


  • In the higher version of JDBC, spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver is generally added with a cj.

This is the previous
this is the current

later, there will be no JDBC connection problem when running on the server side! This is my problem solved, others may have more situations. Here only represents my own solution!

1. Error running ‘application’ occurs when the command line is too long

    error running ‘application’

    1. First find the idea/workspace.xml file in the project, and then find the following line
    & lt; component name=“PropertiesComponent”>& lt;/component >

      then add the following line in the component tag
      & lt; property name=“dynamic.classpath” value=“true” />

      3. Just restart the project. Personal verification, can be used.