[alibaba/p3c]2023.1版本插件报错

2024-01-30 671 views
2

IDEA版本:

image

报错日志:

image

我的IDEA版本是2023.1,更新了目前最新版本的插件版本:2.1.1,下面是堆栈信息:

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
Current thread: Thread[ApplicationImpl pooled thread 23,4,main] 622408301 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1233666557
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1004)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:127)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:70)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:220)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSet(WorkspaceFileIndexImpl.kt:180)
    at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.isInContent(WorkspaceFileIndexImpl.kt:73)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.isInContent(ProjectFileIndexImpl.java:314)
    at com.alibaba.p3c.idea.action.PmdGlobalInspectionContextImpl$startIterateScopeInBackground$task$1$run$1.process(PmdGlobalInspectionContextImpl.kt:234)
    at com.alibaba.p3c.idea.action.PmdGlobalInspectionContextImpl$startIterateScopeInBackground$task$1$run$1.process(PmdGlobalInspectionContextImpl.kt:228)
    at com.intellij.openapi.vfs.CompactVirtualFileSet.process(CompactVirtualFileSet.java:233)
    at com.intellij.analysis.AnalysisScope.accept(AnalysisScope.java:281)
    at com.alibaba.p3c.idea.action.PmdGlobalInspectionContextImpl$startIterateScopeInBackground$task$1.run(PmdGlobalInspectionContextImpl.kt:232)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    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:833)

回答

5

Connection failed

3

确实写错了🥲

2

老哥有没有想法搞到插件市场,这样针对IDEA配置的云同步可以更完善一些~

7

都几年没更新了,该放弃这个了

5

不止是用不了,安装后输入中文还会有严重的卡顿延迟

7

能用吗?用了2022版本的插件,会导致输入中文卡顿,并且使用有问题

8

现在这个插件没人维护了

0

https://plugins.jetbrains.com/plugin/22381-alibaba-java-coding-guidelines-fix-some-bug-


com.intellij.diagnostic.PluginException: Cannot create extension (class=com.alibaba.p3c.idea.listener.MyProjectStartupActivity) [Plugin: io.github.godfather1103.alibaba.p3c]
at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:1057)
at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:70)
at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.kt:31)
at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivities(StartupManagerImpl.kt:587)
at com.intellij.ide.startup.impl.StartupManagerImpl.access$runPostStartupActivities(StartupManagerImpl.kt:66)
at com.intellij.ide.startup.impl.StartupManagerImpl$runStartupActivities$2.invokeSuspend(StartupManagerImpl.kt:184)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.ClassNotFoundException: com.alibaba.p3c.idea.listener.MyProjectStartupActivity
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:220)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at com.intellij.serviceContainer.ComponentManagerImplKt.doLoadClass(ComponentManagerImpl.kt:1528)
at com.intellij.serviceContainer.ComponentManagerImplKt.access$doLoadClass(ComponentManagerImpl.kt:1)
at com.intellij.serviceContainer.ComponentManagerImpl.loadClass(ComponentManagerImpl.kt:947)
at com.intellij.openapi.extensions.impl.InterfaceExtensionImplementationClassResolver.resolveImplementationClass(InterfaceExtensionImplementationClassResolver.kt:24)
at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.doCreateInstance(XmlExtensionAdapter.kt:49)
... 10 more


目前看起来启动还是报错啊,大佬
<img width="695" alt="image" src="https://github.com/alibaba/p3c/assets/32430752/694ae3a1-8cc2-45cd-a838-e734515c28c2">
1

先卸载原来安装的官方版本,再安装我的,两个插件一起的话会冲突

1

看起来是的,启动不会报错了,我把官方的插件禁用了都不可以☹️,只能卸载