jitwatch-intellij icon indicating copy to clipboard operation
jitwatch-intellij copied to clipboard

NoClassDefFoundError: com/intellij/util/PathKt

Open nitram509 opened this issue 7 years ago • 8 comments

Hi,

first of all, thank you for this great plugin. Unfortunately I've got this NoClassDefFoundError, when using it.

Steps to reproduce:

  1. use jitwatch-intellj plugin code from HEAD (02-Oct-2016)
  2. exec gradlew buildPlugin
  3. install plugin locally
  4. run an arbitrary project with JitWatch enabled
  5. JitWatch report is loaded and show
  6. click on one method -> editor opens and method is show
  7. in editor click on icon left of line number, to open JitWatch window to show the java code ==> crash
java.lang.NoClassDefFoundError: com/intellij/util/PathKt
    at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185)
    at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166)
    at ru.yole.jitwatch.JitWatchModelService$loadBytecodeAsync$1.run(JitWatchModelService.kt:154)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.intellij.util.PathKt PluginClassLoader[ru.yole.jitwatch-intellij, 1.0.1]
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 9 more

Any help is welcome.

nitram509 avatar Oct 02 '16 15:10 nitram509

Having the same problem :cry:

Jire avatar Dec 20 '16 04:12 Jire

  1. Installed JITWatch plugin to IntelliJ 2016.3
  2. Added JITWatch 1.0.0 dependency to Maven
  3. Enabled Log compilation in the Configuration
  4. Ran my JavaFX app twice
  5. Got this exception

PS: It says "Not Compiled" for any and every method. This may be my app, as I only have the UI working, but I'm not sure.

DavidHulsman avatar Dec 27 '16 14:12 DavidHulsman

@DavidHulsmanNL your description sounds like a different issue. Mixing up two different issues in one Github issue makes it more complicated and harder to track&solve the actual problem. I propose you create a new Github issue out of it.

nitram509 avatar Dec 28 '16 21:12 nitram509

@nitram509 No, it's definitely the same issue. I get exactly the same error as you do. The "Not Compiled" bit refers to this: Not Compliled image (Just to be clear, I'm not sure if it's related to the error, but I thought to mention it, just in case)

After I close my app I get an exception window right after JITWatch Report opens, with the above error displayed.

Our differences are that you have to execute step 6 and 7 of your list, whereas mine crashes right after step 5 :)

DavidHulsman avatar Dec 29 '16 00:12 DavidHulsman

@DavidHulsmanNL please ask @yole to merge the PR so that more people can enjoy this amazing plugin!

https://github.com/yole/jitwatch-intellij/pull/8

Jire avatar Dec 29 '16 05:12 Jire

Still reproducible when loading compilation log:

com/intellij/util/PathKt java.lang.NoClassDefFoundError: com/intellij/util/PathKt at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185) at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166) at ru.yole.jitwatch.JitWatchModelService$loadBytecodeAsync$1.run(JitWatchModelService.kt:154) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

java.lang.NoClassDefFoundError: com/intellij/util/PathKt at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185) at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166) at ru.yole.jitwatch.JitSourceAnnotator.doAnnotate(JitSourceAnnotator.kt:34) at ru.yole.jitwatch.JitSourceAnnotator.doAnnotate(JitSourceAnnotator.kt:25) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:179) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:38) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:155) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:277) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:291) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:246) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:231) at com.intellij.util.Alarm$Request.runSafely(Alarm.java:405) at com.intellij.util.Alarm$Request.access$700(Alarm.java:330) at com.intellij.util.Alarm$Request$1.run(Alarm.java:371) at com.intellij.util.Alarm$Request.run(Alarm.java:382) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:228) at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

stsypanov avatar Feb 23 '18 21:02 stsypanov

Just hit the same on the latest version of IntelliJ:

annotator: ru.yole.jitwatch.JitSourceAnnotator@6c721e38 (class ru.yole.jitwatch.JitSourceAnnotator)

java.lang.NoClassDefFoundError: com/intellij/util/PathKt
	at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185)
	at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166)
	at ru.yole.jitwatch.JitSourceAnnotator.doAnnotate(JitSourceAnnotator.kt:34)
	at ru.yole.jitwatch.JitSourceAnnotator.doAnnotate(JitSourceAnnotator.kt:25)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:184)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$600(ExternalToolPass.java:40)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$1(ExternalToolPass.java:158)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$10(BackgroundTaskUtil.java:244)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:180)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:180)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:264)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:243)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:157)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:336)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:326)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:276)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:290)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:245)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:232)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:356)
	at com.intellij.util.Alarm$Request.run(Alarm.java:343)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:228)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:227)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2$1.run(BoundedTaskExecutor.java:200)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:229)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.intellij.util.PathKt PluginClassLoader[ru.yole.jitwatch-intellij, 1.0] com.intellij.ide.plugins.cl.PluginClassLoader@1731ba62
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:49)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 37 more

aaime avatar Dec 06 '18 17:12 aaime

intellji2019.01 openjdk 1.8 also has the same problem.how to fix.

java.lang.NoClassDefFoundError: com/intellij/util/PathKt at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185) at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166) at ru.yole.jitwatch.JitWatchModelService$loadBytecodeAsync$1.run(JitWatchModelService.kt:154) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: com.intellij.util.PathKt PluginClassLoader[ru.yole.jitwatch-intellij, 1.0] com.intellij.ide.plugins.cl.PluginClassLoader@4686ba85 at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:51) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 9 more

chrishyc avatar Jun 06 '19 03:06 chrishyc