liferay / liferay-intellij-plugin

Other
24 stars 30 forks source link

NoSuchFieldError: CONFIGURATION_ARTIFACTS (IntelliJ 2023.3 + LF plugin 2.0.7) #296

Closed Losfigatto closed 11 months ago

Losfigatto commented 11 months ago

I have an error using the plugin with IntelliJ 2023.3 (Build #IU-233.11799.241, built on December 2, 2023) and plugin Liferay 2.0.7

In log of IDE I get this stacktrace:

WARN - #o.j.p.g.s.e.GradleExecutionHelper - Gradle execution error
java.lang.NoSuchFieldError: CONFIGURATION_ARTIFACTS
    at com.liferay.ide.idea.core.LiferayGradleProjectResolverExtension.populateModuleDependencies(LiferayGradleProjectResolverExtension.java:74)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.kotlin.idea.gradleJava.configuration.KotlinGradleProjectResolverExtension.populateModuleDependencies(KotlinGradleProjectResolverExtension.kt:358)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.populateModuleDependencies(AbstractProjectResolverExtension.java:103)
    at org.jetbrains.plugins.gradle.service.project.TracedProjectResolverExtension.populateModuleDependencies(TracedProjectResolverExtension.java:72)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.convertData(GradleProjectResolver.java:499)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.doResolveProjectInfo(GradleProjectResolver.java:330)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:870)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:851)
    at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.lambda$execute$0(GradleExecutionHelper.java:145)
    at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.maybeFixSystemProperties(GradleExecutionHelper.java:177)
    at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.lambda$execute$1(GradleExecutionHelper.java:145)
    at org.jetbrains.plugins.gradle.GradleConnectorService$Companion.withGradleConnection(GradleConnectorService.kt:233)
    at org.jetbrains.plugins.gradle.GradleConnectorService.withGradleConnection(GradleConnectorService.kt)
    at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:141)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:162)
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:78)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:35)
    at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:40)
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:34)
    at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:46)
    at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:125)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
    at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.executeSync(ExternalSystemUtil.java:464)
    at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:325)
    at com.intellij.openapi.externalSystem.util.ExternalSystemTaskUnderProgress$2.run(ExternalSystemTaskUnderProgress.java:53)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
    at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invokeSuspend(propagation.kt:195)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:44)
    at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
    at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.async(Builders.common.kt:91)
    at kotlinx.coroutines.BuildersKt.async(Unknown Source)
    at com.intellij.util.concurrency.Propagation.runAsCoroutine(propagation.kt:190)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:89)
    at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)

I have read changelog on JetBrain site this:

**org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.CONFIGURATION_ARTIFACTS field removed**
Related mapping information is no longer accessible using this key. Artifacts mapping data is now stored in the instance of the ArtifactMappingService and can be obtained via org.jetbrains.plugins.gradle.service.project.ProjectResolverContext#getArtifactsMap().

With IntelliJ version 2023.2.* the plugin worked correctly

simonjhy commented 11 months ago

we have fixed this issue for IDEA 2023.3 and prepare publish new version for it. We sent latest plugin to Intellij market place and wait they aprrove it.

simonjhy commented 11 months ago

the workaround is you can try to downgrade to last version IDEA before intellij finished their process.

Losfigatto commented 11 months ago

Thanks a lot for all!

simonjhy commented 11 months ago

@Losfigatto Our plugin has been aprroved. You can install it now.