NoClassDefFoundError: org/jetbrains/plugins/gradle/tooling/ModelBuilderService - gradle

How can I fix this error? It appears when I run the project in Intellij IDEA with GRADLE 6.7 version.

It's a known issue caused by the incompatible Kotlin plug-in update. The issue is already fixed. The solution is to either update Kotlin plug-in again to get the version compatible with IntelliJ IDEA 2020.3 release or update IntelliJ IDEA to 2020.3.1 version.

In my case I just needed to disable kotlin.
if you dont need kotlin at the moment you can disbale it in idea.
just got to Plugins>Installed->Kotlin then disable for all projects.

All I need was just to upgrade IntelliJ IDEA to the latest version. I checked for an update manually:
In the Settings/Preferences dialog Ctrl+Alt+S, select Appearance,
and Behavior | System Settings | Updates.
Click the Check Now button to see if a newer version is available.

Related

IntelliJ IDEA upgrade dependencies feature is missing

In IntelliJ IDEA there is the following feature:
IntelliJ IDEA will show the suggestion to upgrade when we hover over the dependency, and we can click the suggestion to upgrade the dependencies. (source)
This feature always worked for me until a few days ago.
Now the dependencies are not marked with squiggly lines underneath them when an update is available. Also in the dependencies tool the update feature is not available anymore.
How can I restore this feature?

Diagnosing Gradle upgrades and buildSrc errors

I currently have an issue where, after trying to switch from Gradle 6.9.3 to 7.3.3, my :buildSrc:compileGroovy target fails with a NoClassDefFoundError on LoggingManagerInternal, which was a class removed in Gradle 7. The stack trace does not have appear to point to anywhere within the project code.
What would be the best way about diagnosing this issue, where it came from, and how it can be fixed?
In my project, it was using an old version of the gradle-docker-plugin, 'com.bmuschko:gradle-docker-plugin:6.7.0', but in a directory within my project called buildSrc. In buildSrc, there was another build.gradle file I was not aware of, which had an old version of the plugin calling the old gradle API.
My solution was to update that gradle plugin version from 4.6.2 to 6.7.0, and that got me to my next issue in the upgrade.

Kotlin complains about API version not supported

I'm relatively new to Kotlin.
I did create a test project, just the Hello World for now.
Compile/Package OK, then when I try to run the main.kt :
Kotlin: API version 1.1 is no longer supported; please, use version 1.2 or greater.
Is driving me nuts.
Ok, here some info and things I did :
Ubuntu 18.04
IntelliJ Idea Ultimate 2020.3 - all plugins/libraries updated
Kotlin project created from Project --> Kotlin --> Console Application --> SDK 1.8 --> Maven (need to simulate another environment that has similar settings)
On Settings/Build/Kotlin Compiler I selected Language version 1.4
When building I have only some warnings and I did notice this one :
[WARNING] Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/home/steve/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.1.1/kotlin-stdlib-1.1.1.jar (version 1.1)
/home/steve/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.31/kotlin-stdlib-jdk8-1.4.31.jar (version 1.4)
/home/steve/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.31/kotlin-stdlib-jdk7-1.4.31.jar (version 1.4)
So it seems is still importing a stdlib 1.1.1, I did try to remove manually it but without success, is always there.
The POM only has this from jetbrains :
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.4.31</version>
</dependency>
Can anybody please give me some suggestions about how to fix this kind of problem ?
Thanks
STeve
Ok, I did restart from scratch many times trying to identify the problem and I think I did it, i.e. I identified the problem but I don't have a solution.
Starting from scratch everything is working, however I need to add to the project some classes I created in other projects in order to test them.
One of the class imported uses a library called khttp.
Well the moment I add this library as dependence in the project, even without adding any code that use it, screw up everything and I end up with the error :
Kotlin: API version 1.0 is no longer supported; please, use version 1.3 or greater.
The ONLY way I found so far to solve the problem is to remove from the POM the dependency of the library.
So I guess that the problem is IN the library.
If I can't find a solution I guess I need to don't use khttp.
Thanks
Go to
Intellij Preferences -> Build, Execution, Deployment -> Compiler -> Kotlin Compiler. Update Language version
and Api version to the one you wish.
**Click run again it should work fine.
for me it worked like this: right click on project and go to
project settings -> modules -> Kotlin
there I set the API Version to 1.5
I update the Kotlin dependencies version in pom.xml from 1.3.61 to 1.5.10 and it's ok for me
Project Structure>Modules>General
When you go there you gonna see 2 sections right side. Language version and API version. Update these 1.5 and problem will solve easily.

STS - Cannot start a Spring-Starter-Project using gradle after upgrading to buildship-eclipse-gradle-plugin 2.0

After i updated Buildship Eclipse Gradle plugin to 2.0, i cannot create Starter projects anymore.
Using STS 3.8.3.RELEASE
This is a known issue in STS 3.8.3 and got fixed in the meantime. Please refer to https://github.com/spring-projects/spring-ide/issues/90 for more details and how to get the fix immediately.

STS M2E 'Plugin execution not covered by lifecycle configuration" Error - Flex-Mojos

I am trying to write my pom.xml for a multimodal flex application. I have been using this resource as an example:
http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-creating-with-archetype.html
I am using M2E v1.01 but I am faced with a number of 'Plugin execution not covered by lifecycle configuration" errors. As far as I can see - there are no m2E connectors available to resolve this and I have tried all the Maven advice I can find - to include:
Clean
Update dependencies
Update project configuration
The problem only occurs if the project is declared as swc or swf package. My next move to ask Eclipse to 'permanently mark goal as ignored' - which seems a little brash.
Any advice would be appreciated.
Thanks in advance.
With STS 2.8.0, we have upgraded m2eclipse to be version 1.0. However, this can cause a bit of trouble with existing projects. I wrote a blog on this a couple of months ago.
http://blog.springsource.org/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/
Essentially, the new architecture for m2eclipse requires that each maven plugin you use must be mapped to one Eclipse plugin to handle the plugin's execution inside of Eclipse. This obviously causes problems since not every maven plugin author has the knowledge or time to create also create and maintain an Eclipse plugin.
By marking the plugin as ignored, you are saying that the plugin should never be executed inside of Eclipse (implying that whenever you need it to be executed, you will do so from the command line). Once marked as ignored, you can then change it to execute, which means that it should always be executed whenever the associated lifecycle is performed in Eclipse. This may cause performance problems, and so only do it if you know the risks.
If all this is too much for you, then STS provides a downgrade option to revert to an older version of m2eclipse. Go to the Dashboard extensions page. Unfortunately, you will have to manually revert all changes to your .project and .classpath files (we provide an auto-upgrade mechanism, but not a downgrade mechanism...presumably everything is in version control).
Any questions or problems should be sent to the STS forums:
http://forum.springsource.org/forumdisplay.php?32-SpringSource-Tool-Suite
You can check this alpha connector "Flex Maven Integration for Flash Builder" on the eclipse marketplace: http://marketplace.eclipse.org/node/648556.

Resources