Tag Archives: IDEA

IDEA Always Stuck: scanning files to index [Four Methods to Solve]

Problem Description:

Long/repetitive scanning files to index

Scanning files to index: scan files to index

Method 1: File -> Invalidate Caches/Restart

Method 2: delete the C:\users\XXX.Intellijidea2018.2\system folder

Method 3: exclude the scanned folder from the scope of indexing, that is, mark the XXX folder as excluded.

Method 4: change the edit configurations and idea configuration path

1. After scanning for a long time, click Edit configurations and change update classes and resources to do nothing.

2. You will find that the scanning time is very short, but the scanning will be repeated all the time

3. Change the idea configuration path or directly note out three lines of comments to achieve the purpose of refreshing

xx\bin\idea.properties


idea.config.path=D:\Java\idea\IntelliJ IDEA 2018.2.4\01edit\config
idea.system.path=D:\Java\idea\IntelliJ IDEA 2018.2.4\01edit\system
idea.plugins.path=D:\Java\idea\IntelliJ IDEA 2018.2.4\01edit\plugins
 
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.IntelliJIdea/config
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IntelliJIdea/system
 
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins

Process:

Restart the idea, reinstall the idea, shut down and restart, and kill the idea process

The problem of reloading the code is the same, so it must be a configuration problem

Deleting the configuration file is not easy. It may be necessary to refresh and load the configuration file

Without restarting (restarting is not necessarily easy to use), changing the idea configuration path can have the effect of refreshing, or try to release and delete the configuration file, or directly overwrite the configuration file that is easy to use by colleagues

After the change, close the idea, kill the process and restart the task manager

After the update is found, the scanning and indexing will not be repeated

Method v. too many project documents

If there are too many project files, it will be very slow to create an index, so you can exclude directories with a large number of files from the scope of creating an index. Borrow a picture.

 

Start Maven project in idea with jetty and report error caused by: java.lang.classnotfoundexception: org.apache.jasper.runtime.jspapplicationcontextimpl

Start the Maven project in idea with jetty and report this error. I use the default port 8080,

Caused by: java.lang.ClassNotFoundException: org.apache.jasper.runtime.JspApplicationContextImpl

Solution: 1. Change the port (I can start it by changing it to 8083). 2. Kill the occupied 8080 port and restart it

Idea Error: No provider available from registry 127.0.0.1:2181 for service

com.alibaba.dubbo.rpc.RpcException: No provider available from registry 127.0.0.1:2181 for service com.qingcheng.service.order.CartService on consumer 192.168.174.1 use dubbo version 2.6.0, may be providers disabled or not registered ?

Either the local corresponding Dubbo service is not started, or when the controller layer introduces the remote service layer, the @service annotation of the impl implementation class of the service layer is written incorrectly or not (the correct annotation is:

com.alibaba.dubbo.config.annotation.Service;

 

The corresponding Dubbo service is not started

Or in the controller layer, when the remote service is introduced, the impl does not add the @service annotation of Dubbo

Using idea and maven, there is an error: (4, 21) Java: there is no problem with the package javax.servlet

Problem description

Baidu’s many solutions are hard to make, too desperate. (fall)

You must find out the error information and your own use scenario to search, so as to find the correct solution

For example, I use Maven to create a normal Java Web project. Manually added webapp items.

As shown in the error message, it is really the problem that the package javax. Servlet does not exist. But all my bags came in, and there was no error, as shown in the figure below

Then I played with Maven’s clean and compile and idea’s cache clearing, which were useless. Of course, it’s not what other blogs say about setting environment variables and manually copying the package to Tomcat.

solve

The problem is indeed the lack of servlet package, but it is not in the compiled file. The following figure shows the directory structure that should be generated normally

If the idea is the publishing method of the set Project Name: War expanded , the war package will be generated in the target folder

If there is no javax.servlet in the Lib directory of the war package, check it as follows:

1、< packaging> war set packaging method (jar package by default)

2. Manually added webapp projects have such problems

Summary: pay attention to whether there are missing packages in the compiled file. The problem must be found with the use scenario.

IDEA double click can’t open no response Issue [How to Solve]

  Original link: https://www.cnblogs.com/jiazibo/p/14618483.html

I found many methods on the Internet and finally found one that can be solved. If the problem is the same as mine, I can use this method to solve it

1. Open the idea installation root directory bin, select idea.bat, right-click edit, or use txt to open it

2. Add pause in the last line of idea.bat   As shown in the figure

3. Save and close, double-click to run idea.bat

4. An error message will be displayed, as shown in the figure below

5. Find the configuration path error according to the error information

6. Find Disk C under C: \ users \ ThinkPad \    Sets the display of hidden items   So we can find the appdate folder

8. Delete this line (if deleted, it will return to the initial state and try for 30 days)

9. After saving, double-click idea.bat under the idea installation directory bin again   As shown in the figure below, it is successful!

[Solved] IDEA Run error: java: JPS incremental annotation processing is disabled.

SpringCloud Compile Error: java: JPS incremental annotation processing is disabled. Compilation results on partial recompilation may be inaccurate. Use build process “jps.track.ap.dependencies” VM flag to enable/disable incremental annotation processing environment.

Solution:
1. Add: -Djps.track.ap.dependencies=false
2. clear the cache

IDEA Compile Kotlin Project Error: Cannot inline bytecode buit with JVM target 1.8 into bytecode that is being built with JVM target 1.6.Please specify proper ‘-jvm-target’ option

Reason: the target set by idea’s default kotlin compiler is 1.6, which can be modified to 1.8 or above

[Solved] IDEA Error: Failed to resolve org.junit.platform:junit-platform-launcher

Reason for the problem:
the problem here is that IntelliJ tries to solve the required artifact itself without using the Maven “user settings file” (settings. XML) configured in the IDE. It will connect directly to Maven central, but it is blocked by my employer

Solution add in POM file:

<dependency>
 <!-- this is needed or IntelliJ gives junit.jar or junit-platform-launcher:1.3.2 not found errors -->
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
</dependency>