Open evie-lau opened 2 years ago
While messing around with environment testing, I somehow got this to work properly even with the same conditions outlined before. May need more investigation
Also seeing this issue with a Gradle project (running runIde
on Windows) - https://github.com/openliberty/guide-gradle-intro
A second exception I'm seeing while attempting hover and completion is below:
Details: Current thread: Thread[JobScheduler FJ pool 0/11,4,main] 1360345111
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1558623442
java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1056)
at com.intellij.psi.impl.source.tree.TreeElement.assertReadAccessAllowed(TreeElement.java:424)
at com.intellij.psi.impl.source.tree.SharedImplUtil.findFileElement(SharedImplUtil.java:79)
at com.intellij.psi.impl.source.tree.SharedImplUtil.getContainingFile(SharedImplUtil.java:54)
at com.intellij.psi.impl.source.SubstrateRef$2.getContainingFile(SubstrateRef.java:100)
at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:239)
at com.intellij.extapi.psi.StubBasedPsiElementBase.getProject(StubBasedPsiElementBase.java:276)
at io.openliberty.tools.intellij.lsp4mp.lsp4ij.operations.hover.LSPTextHover.lambda$initiateHoverRequest$5(LSPTextHover.java:213)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Also seeing the InvocationTargetException
when importing the plugin as a zip
file outside the runIde
environment.
because "psiPackage" is null
exception is fixed. Exception related to hover is separate.
It appears that this issue may be caused by .idea
directories leftover from old versions of IntelliJ. One workaround is to delete the .idea
directory and restart IntelliJ. Another, better workaround is to right-click on the pom.xml
or build.gradle
of the afflicted project and select "Add as Maven project" or "Add as Gradle project".
In one case, "Add as Maven project" did result in an exception (issue here: https://github.com/OpenLiberty/liberty-tools-intellij/issues/149), however, the issues reported here were resolved and MP/Jakarta language features were still enabled.
This seems to happen in both
ls-integration
, and the recently working java17 version of the branch.Specifically...
runIde
,NOTE: when installing the plugin zip, activating MP/Jakarta LS features seems to work fine without issues.