Tag Archives: idea

Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

Once a project encountered an error before starting compilation: E rror:Kotlin : Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.13.

Module is compiled with an incompatible version of kotlin.

But I have never encountered any problems, and no similar solution has been found on the Internet.

Later, I tried many ways, but I restarted the plug-in

You can cancel it and check it again, and then restart the project.

Idea stuck and error reported: UI was frozen for xxxxx MS problem solving

Phenomenon

After idea starts and clicks a menu, there is no reaction at all. When you click close, you can’t close it. Check the log and report the following error:

➜  bin 2021-04-30 00:20:31,777 [ 317987]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 5750ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002031-IU-203.7148.57-RandomAccessFile.readBytes-5sec 
2021-04-30 00:20:45,194 [ 331404]   WARN - s.ui.configuration.SdkDetector - No version is returned for detected SDK IDEA JDK at /home/zeek/software/idea-IU-203.7148.57 
2021-04-30 00:22:05,304 [ 411514]   WARN - ystem.impl.ActionPopupMenuImpl - 1174ms to fill popup menu ProjectViewPopup 
2021-04-30 00:22:33,250 [ 439460]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
2021-04-30 00:22:33,426 [ 439636]   WARN - ConfigurableExtensionPointUtil - use other group instead of unexpected one: build.android 
2021-04-30 00:22:44,580 [ 450790]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 12256ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002237-IU-203.7148.57-ShowSettingsAction.perform-12sec

It was serious at the beginning, and I don’t know the specific reason.

Processing steps

First of all, because I use Linux operating system, the default JDK is openjdk 11. Generally speaking, openjdk is not as stable as Oracle JDK, and openjdk 11 is too new, so the default JDK of Jiujiang operating system is Oracle JDK 9.

➜  bin java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Secondly, because the default memory used by idea is about 700m, insufficient memory may also lead to the above situation. Therefore, the running memory of idea is adjusted to 2G, and the configuration file is idea installation directory/bin/idea64. Vmoptions . The configuration content is as follows (only the sizes of – XMS and – Xmx are modified)

-Xms512m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true

Finally, disable some plug-ins that you can’t use at ordinary times.

After the above three steps, the idea Caton phenomenon is not so obvious (invisible to the naked eye).


Title: idea stuck and error: UI was frozen for xxxxx MS problem solving
Author: zeekling
tips: Please note that the article is reproduced from personal blog: Xiaoling children’s shoes

Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrup

Using idea development, Maven build error:

 Error assembling WAR: Problem creating war: Execution exception (and the archive is probably corrupt but I could not delete it)

The cause of the error is that the memory of the JVM is not enough, so it’s better to configure it. The steps are as follows:

So we modify Maven’s JVM parameters directly in idea,

file-> setting-> Build,Execution,Deployment-> Maven-> Runner

Set the JVM parameter in VM option column, – xmx1g – XX: maxmetaspacesize = 128M

After setting, click Install on the right side to start the compilation, the parameter takes effect, and the maximum heap memory becomes 1g
0  

Error:Cannot build artifact xxx:war exploded’ because it is included into a circular dependency

Error:Cannot build artifact xxx:war exploded’ because it is included into a circular dependency solution
IDEA error: Error:Cannot build artifact xxx:war exploded’ because it is included into a circular dependency

How to Solve:
ctrl + alt + shift + s Open project structure (or ctrl alt + a to search for project structure)
Click on the left artifacts and delete the two extra ones, which are
xxx:warxxx:war exploded
Delete is OK

Idea | change the default configuration of idea to open a new project

background

Children’s shoes who have used idea should find that when you open a new project with idea, you always need to reconfigure it. It will use the default configuration of the system, such as maven, JDK and so on.

Solution

Idea actually has a setting to change the default configuration of new projects. You can change a default configuration for new projects through the following configuration:
file - & gt; other settings - & gt; setting for new projects or file - & gt; other settings - & gt; structure for new projects



Halo blog system reports log error when idea is running

The solution of importing idea: cannot resolve symbol ‘log’ when running someone else’s project (halo blog system)

When importing other people’s projects, the log will report an error and prompt cannot resolve symbol ‘log’. After online query, you can install the Lombok plug-in. Here’s what the Lombok plug-in does.

The official introduction is as follows:

Project Lombok makes java a spicier language by adding 'handlers' that know how to build and compile simple, boilerplate-free, not-quite-java code.

Lombok can make Java concise and fast by adding some “handlers”.

About Lombok:

Lombok can simplify java code in the form of simple annotations and improve the development efficiency of developers. For example, JavaBeans often need to be written in development. They need to spend time to add corresponding getter/setter, and maybe also need to write constructor, equals and other methods. Moreover, they need to be maintained. When there are many attributes, there will be a large number of getter/setter methods, which are very lengthy and not too technical. Once the attributes are modified, it is easy to forget to modify the corresponding methods.

Lombok can automatically generate constructor, getter/setter, equals, hashcode and toString methods for attributes at compile time through annotation. The magic is that there are no getter and setter methods in the source code, but there are getter and setter methods in the bytecode file generated by compilation. This saves the trouble of manually rebuilding the code and makes it look simpler.

terms of settlement:

1.1ctrl + Alt + s open Settings

Search or directly select plugins and search Lombok installation in the marketplace

After installation, as shown in the figure

After recompiling, you can run the project, and the log error disappears

Mapped Statements collection does not contain value for XXXX

Today, I stepped into an interesting pit with mybatis. After a day’s searching, I didn’t find the problem. Let me tell you about the conventional solutions.

The command space of the mapping file of

    mybatis is inconsistent with the fully qualified name of the interface; it is possible that the name of the mapping file of mybatis is inconsistent with the class name of the interface; in another case, the method declared by the interface is not included in the mapping file.

But I checked n times! N times! There is no problem. It’s perfect, but it’s a mistake!

The result is that the XML file is not compiled!

When compiling, put the XML file in the folder like this

you can see that the XML file is not compiled.
We are here pom.xml Add the following code to the

<build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
    </build>

Recompile

XML is compiled to solve the problem

Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError

noun explanation java.lang.OutOfMemoryError Out of memory error
0 java.lang.StackOverflowError Stack overflow error

When developing applications with IntelliJ idea, If you compile a large amount of code, you will encounter
problems java.lang.OutOfMemoryError : Java heap space
error:

the usual solution is as follows
1. Click file setting search compiler

2. Change the value of “bulk process heap size (Mbytes)” to 2048

2 and java.lang.StackOverflowError Usually due to the program loop, infinite recursion. But I have also encountered a situation, not set the JVM parameters

The solution is as follows:
1. Click Tomcat – select Edit configurations

2. Select VM options as shown in the figure

the settings are as follows:
1- Ddruid.log.stmt .executableSql=true
-server
-Xms1024m
-Xmx1024m
-XX:MaxNewSize=512m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-noverify
– Drebel.spring_ plugin=true
– Drebel.mybatis_ plugin=true
– Drebel.log4j -plugin=true
– Drebel.disable_ update=true`

click “apply” – “OK”