Plugin testing - tests works only with Java 1.6.0_65 ?

Hello guys,

We are using Gradle and Groovy in our IntelliJ plugin project, and we have developed several tests.
based on https://confluence.jetbrains.com/display/IDEADEV/Testing+IntelliJ+IDEA+Plugins

The problem is, that these tests are working only on Java 1.6.0_65. The problem with this Java version is, that it's only on OS X and we would need to run them also on Linux/Windows. (Java version 1.6.0_65 is "advanced" edition which is not publicly avaliable).

When we try to run the tests with Java 1.7 or 1.8 we are getting errors which comes from com.intellij.

We are using IntelliJ EAP 140.2683.2

If anyone have idea what could be a problem, it would help us. Thank you.

java.lang.AssertionError: com/sun/jdi/Value
     at com.intellij.testFramework.LoggedErrorProcessor.processError(LoggedErrorProcessor.java:56)
     at com.intellij.testFramework.TestLogger.error(TestLogger.java:67)
     at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
     at com.intellij.ide.plugins.PluginManager.processException(PluginManager.java:134)
     at com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectManagerImpl.java:405)
     at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
     at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
     at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:180)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.getDefaultProject(ProjectManagerImpl.java:397)
     at com.intellij.javaee.DefaultHtmlDoctypeInitialConfigurator.<init>(DefaultHtmlDoctypeInitialConfigurator.java:20)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
     at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
     at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
     at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
     at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:125)
     at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:359)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:116)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
     at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:101)
     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:504)
     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:486)
     at com.intellij.idea.IdeaTestApplication$1.run(IdeaTestApplication.java:56)
     at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
     at com.intellij.openapi.application.WriteAction$1$1.run(WriteAction.java:47)
     at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:937)
     at com.intellij.openapi.application.WriteAction$1.run(WriteAction.java:44)
     at com.intellij.openapi.application.WriteAction.execute(WriteAction.java:53)
     at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:53)
     at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:167)
     at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:50)
     at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$21.run(CodeInsightTestFixtureImpl.java:1216)
     at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2395)
     at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1212)
     at com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase.setUp(LightPlatformCodeInsightFixtureTestCase.java:65)
     at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:341)
     at com.intellij.testFramework.UsefulTestCase$4.run(UsefulTestCase.java:428)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
     at java.awt.EventQueue.access$300(EventQueue.java:103)
     at java.awt.EventQueue$3.run(EventQueue.java:699)
     at java.awt.EventQueue$3.run(EventQueue.java:697)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
     at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

ERROR: com/sun/jdi/Value
java.lang.NoClassDefFoundError: com/sun/jdi/Value
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:191)
     at com.sun.proxy.$Proxy49.<clinit>(Unknown Source)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     at java.lang.reflect.Proxy.newInstance(Proxy.java:764)
     at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755)
     at com.intellij.util.EventDispatcher.<init>(EventDispatcher.java:75)
     at com.intellij.util.EventDispatcher.create(EventDispatcher.java:42)
     at com.intellij.debugger.impl.DebuggerStateManager.<init>(DebuggerStateManager.java:28)
     at com.intellij.debugger.impl.DebuggerManagerImpl$MyDebuggerStateManager.<init>(DebuggerManagerImpl.java:588)
     at com.intellij.debugger.impl.DebuggerManagerImpl$MyDebuggerStateManager.<init>(DebuggerManagerImpl.java:588)
     at com.intellij.debugger.impl.DebuggerManagerImpl.<init>(DebuggerManagerImpl.java:79)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
     at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
     at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
     at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
     at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:125)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:116)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
     at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:295)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:323)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.access$700(ProjectManagerImpl.java:86)
     at com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectManagerImpl.java:402)
     at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
     at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
     at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:180)
     at com.intellij.openapi.project.impl.ProjectManagerImpl.getDefaultProject(ProjectManagerImpl.java:397)
     at com.intellij.javaee.DefaultHtmlDoctypeInitialConfigurator.<init>(DefaultHtmlDoctypeInitialConfigurator.java:20)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
     at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
     at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
     at com.intellij.util.pico.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:58)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:550)
     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:610)
     at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:245)
     at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:125)
     at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:359)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:116)
     at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
     at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:101)
     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:504)
     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:486)
     at com.intellij.idea.IdeaTestApplication$1.run(IdeaTestApplication.java:56)
     at com.intellij.openapi.application.RunResult.run(RunResult.java:38)
     at com.intellij.openapi.application.WriteAction$1$1.run(WriteAction.java:47)
     at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:937)
     at com.intellij.openapi.application.WriteAction$1.run(WriteAction.java:44)
     at com.intellij.openapi.application.WriteAction.execute(WriteAction.java:53)
     at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:53)
     at com.intellij.testFramework.LightPlatformTestCase.initApplication(LightPlatformTestCase.java:167)
     at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:50)
     at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$21.run(CodeInsightTestFixtureImpl.java:1216)
     at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2395)
     at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1212)
     at com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase.setUp(LightPlatformCodeInsightFixtureTestCase.java:65)
     at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:341)
     at com.intellij.testFramework.UsefulTestCase$4.run(UsefulTestCase.java:428)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
     at java.awt.EventQueue.access$300(EventQueue.java:103)
     at java.awt.EventQueue$3.run(EventQueue.java:699)
     at java.awt.EventQueue$3.run(EventQueue.java:697)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:708)
     at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.ClassNotFoundException: com.sun.jdi.Value

2 comments
Comment actions Permalink

You need to add lib/tools.jar to the classpath of the JDK that you use for running the tests.


0
Comment actions Permalink

Thank you for you response.

Unfurtenetely it didn't help. When I checked 1.8 SDK it was already imported there. In 1.7 SDK I had to add it manually. But it didn't work on any of these version.

I can add that we can build the plugin itself with any version of Java without any problem. And we are using gradle to run these tests.

0

Please sign in to leave a comment.