Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

IntelliJ integration

Moderators: Vladimir Kondratyev, Anton Katilin

IntelliJ integration

Postby Eddie » Wed Apr 07, 2021 6:04 am

I switched from eclipse to IntelliJ and installed the plugin as suggested.
Profiling with Yourkit Java Profiler is available but disabled, eclipse integration works just fine.

I am using IntelliJ Ultimate Edition 2020.3.2 and Yourkit Java Profiler 2020.7-b376 with Java 8 (OpenJDK).

What could I try to get it enabled?
Eddie
 
Posts: 16
Joined: Thu Apr 10, 2008 1:03 pm

Re: IntelliJ integration

Postby Anton Katilin » Wed Apr 07, 2021 9:22 am

Older versions of the profiler may not work with latest IDEs.

Please use the latest YourKit Java Profiler 2021.3.
Anton Katilin
 
Posts: 6029
Joined: Wed Aug 11, 2004 8:37 am

Re: IntelliJ integration

Postby Andrew » Thu Apr 08, 2021 8:31 am

I had the same problem. Upgrading YouKit solved it.
Andrew
 
Posts: 3
Joined: Thu Apr 08, 2021 8:29 am

Re: IntelliJ integration

Postby Eddie » Mon Apr 12, 2021 7:36 am

It took me some time for several checks.
A colleague just updated the working IJ to the newest version and the profiler still worked as before. So IDEA 2020.3.3 and Java Profiler 2020.7-b369 seem to be able to work together.

IntelliJ showed me a stacktrace while trying to use the YourKit Java Profiler Plugin (see below):

I am not sure, maybe this is not the fault of the YourKit plugin...
But then an update ( I have to convince my manager) would not help.

com.intellij.diagnostic.PluginException: While loading class com.yourkit.idea14_1Plugin.MyRunner: com/intellij/execution/impl/DefaultJavaProgramRunner [Plugin: YourKit Java Profiler 2020.7-b376 Integration]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:318)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:238)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:127)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.getImplementationClass(ExtensionComponentAdapter.java:75)
at com.intellij.openapi.extensions.impl.ExtensionComponentAdapter.createInstance(ExtensionComponentAdapter.java:37)
at com.intellij.openapi.extensions.impl.XmlExtensionAdapter.createInstance(XmlExtensionAdapter.java:69)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processAdapter(ExtensionPointImpl.java:472)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.access$200(ExtensionPointImpl.java:37)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl$1.next(ExtensionPointImpl.java:367)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl$RunnerItem.findRunner(RunnerAndConfigurationSettingsImpl.kt:613)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl$RunnerItem.loadState(RunnerAndConfigurationSettingsImpl.kt:487)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.readExternal(RunnerAndConfigurationSettingsImpl.kt:244)
at com.intellij.execution.impl.RunConfigurationSchemeManager.readData(RunConfigurationSchemeManager.kt:60)
at com.intellij.execution.impl.RunConfigurationSchemeManager.createScheme(RunConfigurationSchemeManager.kt:43)
at com.intellij.execution.impl.RunConfigurationSchemeManager.createScheme(RunConfigurationSchemeManager.kt:21)
at com.intellij.configurationStore.LazySchemeProcessor.createScheme$default(scheme-impl.kt:65)
at com.intellij.configurationStore.schemeManager.SchemeLoader.loadScheme(schemeLoader.kt:175)
at com.intellij.configurationStore.schemeManager.SchemeManagerImpl$loadSchemes$isLoadOnlyFromProvider$2.invoke(SchemeManagerImpl.kt:194)
at com.intellij.configurationStore.schemeManager.SchemeManagerImpl$loadSchemes$isLoadOnlyFromProvider$2.invoke(SchemeManagerImpl.kt:42)
at com.intellij.configurationStore.SchemeManagerIprProvider.processChildren(SchemeManagerIprProvider.kt:48)
at com.intellij.configurationStore.schemeManager.SchemeManagerImpl.loadSchemes(SchemeManagerImpl.kt:192)
at com.intellij.configurationStore.schemeManager.SchemeManagerImpl.reload(SchemeManagerImpl.kt:253)
at com.intellij.execution.impl.RunManagerImpl.loadState(RunManagerImpl.kt:798)
at com.intellij.execution.impl.RunManagerImpl.loadState(RunManagerImpl.kt:72)
at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:445)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:377)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:124)
at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:49)
at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:402)
at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:53)
at com.intellij.serviceContainer.ServiceComponentAdapter.access$createAndInitialize(ServiceComponentAdapter.kt:13)
at com.intellij.serviceContainer.ServiceComponentAdapter$doCreateInstance$1.run(ServiceComponentAdapter.kt:43)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:218)
at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:42)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:457)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:440)
at com.intellij.execution.impl.ProjectRunConfigurationInitializer.serviceCreated(ProjectRunConfigurationInitializer.kt:28)
at com.intellij.openapi.project.impl.ProjectExImpl$init$$inlined$runOnlyCorePluginExtensions$1.accept(projectLoader.kt:87)
at com.intellij.openapi.project.impl.ProjectExImpl$init$$inlined$runOnlyCorePluginExtensions$1.accept(projectLoader.kt)
at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:296)
at com.intellij.openapi.project.impl.ProjectExImpl.init(ProjectExImpl.kt:286)
at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:173)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.prepareProject(ProjectManagerExImpl.kt:240)
at com.intellij.openapi.project.impl.ProjectManagerExImpl.access$prepareProject(ProjectManagerExImpl.kt:51)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$openProject$$inlined$runInAutoSaveDisabledMode$lambda$1.invoke(ProjectManagerExImpl.kt:103)
at com.intellij.openapi.project.impl.ProjectManagerExImpl$openProject$$inlined$runInAutoSaveDisabledMode$lambda$1.invoke(ProjectManagerExImpl.kt:51)
at com.intellij.openapi.project.impl.ProjectUiFrameAllocator$run$progressTask$1.run(ProjectFrameAllocator.kt:86)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:79)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: com/intellij/execution/impl/DefaultJavaProgramRunner
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:404)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:389)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:350)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:315)
... 70 more
Caused by: java.lang.ClassNotFoundException: com.intellij.execution.impl.DefaultJavaProgramRunner PluginClassLoader[PluginDescriptor(name=YourKit Java Profiler 2020.7-b376 Integration, id=YourKit Java Profiler 2020.7-b376 Integration, path=C:\eprojects\IntelliJ IDEA 2020.2.3\plugins\yourkit-for-idea.jar, version=2020.7.376.0)] [email protected]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:129)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 76 more
Eddie
 
Posts: 16
Joined: Thu Apr 10, 2008 1:03 pm

Re: IntelliJ integration

Postby Eddie » Mon Apr 12, 2021 8:11 am

Just to let ou know in case other have the same problem.

Reading through mit IDEA logs I had an idea:

It seemed that YourKit does not install the plugin in the correct directory. I changed the default directory for plugins to idea.plugins.path=C:/eprojects/idea/plugins, but the plugin was installed in the plugin directory of my IDEA installation.

Copying yourkit-for-idea.jar into the correct directory solved my problem.
Eddie
 
Posts: 16
Joined: Thu Apr 10, 2008 1:03 pm

Re: IntelliJ integration

Postby Anton Katilin » Tue Apr 13, 2021 9:11 am

Caused by: java.lang.ClassNotFoundException: com.intellij.execution.impl.DefaultJavaProgramRunner

Please use the newest profiler version with newest IDEA versions.

I changed the default directory for plugins

If you changed the IDEA plugin directory location please use the wizard's option "IDEA is configured to use non-standard plugins directory".
Anton Katilin
 
Posts: 6029
Joined: Wed Aug 11, 2004 8:37 am

Re: IntelliJ integration

Postby Eddie » Thu Apr 15, 2021 1:24 pm

Anton Katilin wrote:
Caused by: java.lang.ClassNotFoundException:
I changed the default directory for plugins

If you changed the IDEA plugin directory location please use the wizard's option "IDEA is configured to use non-standard plugins directory".


I haven't noticed this option. I copied the jar manually, next time I will use the wizard.

Thanks,
Eddie
Eddie
 
Posts: 16
Joined: Thu Apr 10, 2008 1:03 pm


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.