Tag Archives: idea

When using idea to start a project, an error is reported: Error:java : Compilation failed: internal java compiler error

When using idea to start a project, an error is reported: Error:java : Compilation failed: internal java compiler error

(1) Error reason: the setting in Java compiler is inconsistent with the Java version used in the current project.

(2) Solution: if Java 1.8 is used in the project, it should be set to 1.8 in Java compiler.

The settings are as follows:

References: Click to open the link

IntelliJ idea solves Tomcat error: error listener start

When using idea, Tomcat can’t start normally, error prompt: org.apache.catalina . core.StandardContext.startInternal Error listener start. No more detailed error information.
Google has a plan to record Tomcat log details: create a new one in the project resource directory logging.properties File, enter the following into the file:

  handlers = org.apache.juli.FileHandler,java.util.logging.ConsoleHandler 
 org.apache.juli.FileHandler.level = FINE 
 org.apache.juli.FileHandler.directory = ${catalina.base}/logs 
 org.apache.juli.FileHandler.prefix = error-debug.

java.util.logging.ConsoleHandler.level = FINE 
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Restart tomcat, you will find more detailed error information under server.
My error message here:
caused by: org.springframework.context . annotation.ConflictingBeanDefinitionException : Annotation-specified bean name ‘newsManagerController’ for bean class [ com.qf.official . controller.NewsManagerController ] conflicts with existing, non-compatible bean definition of same name and class [ com.qf.bookbar . news.controller.NewsManagerController ].
because the name of a class has been modified before, which is duplicate with the class name in the system, the problem is solved by modifying the class name.

Error running ‘xxxapplication’: no JDK for module ‘xxx’

When I was running the project today, I suddenly found that the project that had been well before could not be started. An error was reported

Error running ‘XXXApplication’: No jdk for module ‘XXX’

Normally, JDK is set in file – & gt; project structure, and there is no problem after checking

Later, after several twists and turns, through a direct search of JDK in settings, we found that there was such a place

The arrow points to the current state. Change this to the normal 1.8, and the project can run happily

 

Idea running error running ‘application’: solution to command line is too long

There are other idea error reporting tutorials in the personal blog. Students who need them can click the link below

https://www.itqiankun.com/article/100983585

When a new project is started in idea, it sometimes reports error running ‘application’: command line is too long. Short command line for application or aalso for spring boot default configuration. The error message is as follows

how to solve it?First, find the idea in the project/ workspace.xml File, and then find & lt; Component name = "propertiescomponent" & gt; & lt; & component & gt; tag, as shown below

and then add a line & lt; property name> to the component tag=“ dynamic.classpath "Value =" true "/ & gt; , that is to say,

in this way, when starting a project, there will be no error ☝ What's going on ☝ ؏؏

Idea community version starts Tomcat to report error running ‘XXXXXX’: java.lang.NullPointerException

catalog

 

1、 Idea version

2、 Error information

3、 Solutions


1、 Idea version

2、 Error information

Error running ‘XXXXXX’: java.lang.NullPointerException

3、 Solutions

Modify the port number of Tomcat and restart Tomcat

 

I don’t know why it’s OK to change the port. Port is not occupied, online check again, no result, is worried about how to solve the time, changed the next port on the line.

 

Java error: unable to find or load the main class

1、 Problem
today, copy the code of idea to eclipse for execution, and then report an error: “error: unable to find or load the main class”;

2、 The solution
can be executed in idea and can be executed in eclipse, which means that there is no problem with the code. The only problem is the running environment. After checking the configuration, the problem is found:

here is an error in Maven dependency:

what the hell pom.xml Log off the error reporting dependency in the file, and then run the main method;

appear Error:java : javacTask: source release 1.7 requires target release 1.7

The following error occurred during compiling java code using idea:

Error:java : javacTask: source release 1.7 requires target release 1.7

Above:

When such a problem occurs, you can set it in settings:

Here, set the compiler version to 1.7. One is to set project, two is to set module.

If you build with maven, you can directly specify the compiled version of Java in POM. Add the following code:

    <build>
        <finalName>5_mybatis_maven</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

Then select pom.xml Right click reinport to let Maven download the corresponding plug-ins

Now to compile, is not to see the rain in the rainbow!

Reference link:

http://stackoverflow.com/questions/12900373/idea-javac-source-release-1-7-requires-target-release-1-7

Bug: unable to download source code in idea, error cannot download sources sources not found for:XXX

Bug Description: idea can’t download the source code, click choose Resource & gt; [select source code package] to confirm and report an error.
Solution: enter the project in the command line interface pom.xml File folder, execute the following command:

mvn dependency:resolve -Dclassifier=sources

Note: do not directly execute the command in terminal in the lower left corner of idea, but in DOS interface.