From jorn.vernee at oracle.com Wed Apr 1 13:34:55 2020 From: jorn.vernee at oracle.com (Jorn Vernee) Date: Wed, 1 Apr 2020 15:34:55 +0200 Subject: Sponsor Request: Running jtreg plugin can fail with NoClassDefFoundError: com/beust/jcommander/ParameterException Message-ID: <05a70170-a481-1367-f930-9d286f4e9365@oracle.com> Hi, When running a jtreg run configuration with the intellij jtreg plugin I am running into: java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException ??? at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:87) ??? at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54) ??? at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ??? at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ??? at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ??? at java.base/java.lang.reflect.Method.invoke(Method.java:564) ??? at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) ??? at java.base/java.lang.Thread.run(Thread.java:832) Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException ??? at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) ??? at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ??? at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ??? ... 8 more It looks like the jcommander jar is missing from the runtime class path. Following change fixes it for me [1]. I've also added the jcov jars just in case, since they ship with jtreg, and might also be needed at some point, though the particular problem I'm seeing is fixed if I only add the jcommander jar. Thanks, Jorn [1]: diff --git a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java index d79f503..a813ac9 100644 --- a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java +++ b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java @@ -158,6 +158,9 @@ class JTRegConfigurationRunnableState extends JavaTestFrameworkRunnableState References: <05a70170-a481-1367-f930-9d286f4e9365@oracle.com> Message-ID: I don't have jcommander.jar in my jtreg/lib folder. Jon, do you know if the list of bundled libraries changes on a per-platform basis? Thanks Maurizio On 01/04/2020 14:34, Jorn Vernee wrote: > Hi, > > When running a jtreg run configuration with the intellij jtreg plugin > I am running into: > > java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException > ??? at > com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:87) > ??? at > com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54) > ??? at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > ??? at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ??? at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ??? at java.base/java.lang.reflect.Method.invoke(Method.java:564) > ??? at > com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) > ??? at java.base/java.lang.Thread.run(Thread.java:832) > Caused by: java.lang.ClassNotFoundException: > com.beust.jcommander.ParameterException > ??? at > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) > ??? at > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) > ??? at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) > ??? ... 8 more > > It looks like the jcommander jar is missing from the runtime class > path. Following change fixes it for me [1]. I've also added the jcov > jars just in case, since they ship with jtreg, and might also be > needed at some point, though the particular problem I'm seeing is > fixed if I only add the jcommander jar. > > Thanks, > Jorn > > [1]: > > diff --git > a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java > b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java > > index d79f503..a813ac9 100644 > --- > a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java > +++ > b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java > @@ -158,6 +158,9 @@ class JTRegConfigurationRunnableState extends > JavaTestFrameworkRunnableState javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/testng.jar"); > javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/junit.jar"); > javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/asmtools.jar"); > + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/jcommander.jar"); > + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/jcov.jar"); > + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + > "/lib/jcov_network_saver.jar"); > ???? } > > ???? protected void configureRTClasspath(JavaParameters > javaParameters, Module module) throws CantRunException { > From jonathan.gibbons at oracle.com Wed Apr 1 16:48:36 2020 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Wed, 1 Apr 2020 09:48:36 -0700 Subject: Sponsor Request: Running jtreg plugin can fail with NoClassDefFoundError: com/beust/jcommander/ParameterException In-Reply-To: References: <05a70170-a481-1367-f930-9d286f4e9365@oracle.com> Message-ID: I think it's more version dependent and/or where you get TestNG from.? It used to be co-bundled; my recollection is that that is no longer the case. -- Jon On 4/1/20 9:30 AM, Maurizio Cimadamore wrote: > I don't have jcommander.jar in my jtreg/lib folder. > > Jon, do you know if the list of bundled libraries changes on a > per-platform basis? > > Thanks > Maurizio > > On 01/04/2020 14:34, Jorn Vernee wrote: >> Hi, >> >> When running a jtreg run configuration with the intellij jtreg plugin >> I am running into: >> >> java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException >> ??? at >> com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:87) >> ??? at >> com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54) >> ??? at >> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native >> Method) >> ??? at >> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >> ??? at >> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> ??? at java.base/java.lang.reflect.Method.invoke(Method.java:564) >> ??? at >> com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) >> ??? at java.base/java.lang.Thread.run(Thread.java:832) >> Caused by: java.lang.ClassNotFoundException: >> com.beust.jcommander.ParameterException >> ??? at >> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) >> ??? at >> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) >> ??? at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) >> ??? ... 8 more >> >> It looks like the jcommander jar is missing from the runtime class >> path. Following change fixes it for me [1]. I've also added the jcov >> jars just in case, since they ship with jtreg, and might also be >> needed at some point, though the particular problem I'm seeing is >> fixed if I only add the jcommander jar. >> >> Thanks, >> Jorn >> >> [1]: >> >> diff --git >> a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java >> b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java >> >> index d79f503..a813ac9 100644 >> --- >> a/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java >> +++ >> b/plugins/idea/src/com/oracle/plugin/jtreg/configuration/JTRegConfigurationRunnableState.java >> @@ -158,6 +158,9 @@ class JTRegConfigurationRunnableState extends >> JavaTestFrameworkRunnableState> javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/testng.jar"); >> javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/junit.jar"); >> javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/asmtools.jar"); >> + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/jcommander.jar"); >> + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/jcov.jar"); >> + javaParameters.getClassPath().add(jtregSettings.getJTRegDir() + >> "/lib/jcov_network_saver.jar"); >> ???? } >> >> ???? protected void configureRTClasspath(JavaParameters >> javaParameters, Module module) throws CantRunException { >> From maurizio.cimadamore at oracle.com Fri Apr 17 11:09:48 2020 From: maurizio.cimadamore at oracle.com (Maurizio Cimadamore) Date: Fri, 17 Apr 2020 12:09:48 +0100 Subject: RFR: JDK-8243000: javac only build fails after removal of Nashorn In-Reply-To: <1aa5bbc3-674c-02fd-9dfe-6b827c352b6e@oracle.com> References: <5c15bcc5-143e-fdac-11e9-d6d055d4aa66@oracle.com> <564BB819-EE0B-4EB8-9521-00565D378876@oracle.com> <5f9bbfca-1914-cc0d-dd14-45d8dd91b98b@oracle.com> <1aa5bbc3-674c-02fd-9dfe-6b827c352b6e@oracle.com> Message-ID: <66b95da8-2cb7-82e9-d8fe-e91d8ca66ddc@oracle.com> Here's my take on the intellij support http://cr.openjdk.java.net/~mcimadamore/8243000_v2/ It would be good if some other folks running either the langtools or the JDK IntelliJ project could provide feedback as to whether this is working in their setup. Cheers Maurizio On 17/04/2020 11:23, Maurizio Cimadamore wrote: > The regex looks good. > > I'm taking a look at the intellij support, in both langtools and the > wider JDK to see which changes need to be made. There is at least one > issue there that I'm aware of (e.g. dependency on