Re: [EXTERNAL] cannot find or load main class - still - again
That's configured in the project properties in the "Compile" section Christopher C. Lanz schrieb am 16.02.2023 um 18:48: Hello, thanks for the suggestion, but I'm not sure: I inevitably run by typing "F6". Chris Lanz - *From:* Thomas Kellerer *Sent:* Thursday, February 16, 2023 8:52 AM *To:* users@netbeans.apache.org *Subject:* [EXTERNAL] Re: cannot find or load main class - still - again This message did not originate from SUNY Potsdam or one of its trusted senders. Do not open attachments, click on links, or provide your credentials if the source is suspicious. Are you using "Compile on Save"? I have had occasional problems with that. If you do use it, try to disable it and see if your problem goes away Thomas Christopher C. Lanz schrieb am 16.02.2023 um 14:27: Hello, I am getting this error (output below) about every 4^th time I run a (large) program for debugging. While clearing the cache _does_ solve the problem, so does the simple act of adding "//" to an early line in the main method, or sometimes removing "//" or changing a "/* */" pair. First question: Does anyone have suggestions about why this happens, and/or how I can reduce/eliminate the occurrences of the error? Second question: Does anyone know how to get NetBeans support in the event the community is unable to help? Thanks. Chris Lanz 340 Dunn Hall, SUNY Potsdam lan...@potsdam.edu 315 268 1547 --- exec-maven-plugin:1.5.0:exec (default-cli) @ Wdax --- Error: Could not find or load main class mainPackage.Wdax Caused by: java.lang.ClassNotFoundException: mainPackage.Wdax Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:764) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:711) at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:289) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104) at java.lang.reflect.Method.invoke (Method.java:578) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Re: [EXTERNAL] Re: cannot find or load main class - still - again
Hello, thanks for the suggestion, but I'm not sure: I inevitably run by typing "F6". Chris Lanz 340 Dunn Hall, SUNY Potsdam lan...@potsdam.edu 315 268 1547 From: Thomas Kellerer Sent: Thursday, February 16, 2023 8:52 AM To: users@netbeans.apache.org Subject: [EXTERNAL] Re: cannot find or load main class - still - again This message did not originate from SUNY Potsdam or one of its trusted senders. Do not open attachments, click on links, or provide your credentials if the source is suspicious. Are you using "Compile on Save"? I have had occasional problems with that. If you do use it, try to disable it and see if your problem goes away Thomas Christopher C. Lanz schrieb am 16.02.2023 um 14:27: > Hello, > > I am getting this error (output below) about every 4^th time I run a > (large) program for debugging. While clearing the cache _does_ solve the > problem, so does the simple act of adding "//" to an early line in the main > method, or sometimes removing "//" or changing a "/* */" pair. > > First question: > > Does anyone have suggestions about why this happens, and/or how I can > reduce/eliminate the occurrences of the error? > > Second question: > > Does anyone know how to get NetBeans support in the event the community is > unable to help? > > Thanks. > > Chris Lanz > > 340 Dunn Hall, SUNY Potsdam > > lan...@potsdam.edu > > 315 268 1547 > > --- exec-maven-plugin:1.5.0:exec (default-cli) @ Wdax --- > > Error: Could not find or load main class mainPackage.Wdax > > Caused by: java.lang.ClassNotFoundException: mainPackage.Wdax > > Command execution failed. > > org.apache.commons.exec.ExecuteException: Process exited with an error: 1 > (Exit value: 1) > > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > > at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:764) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:711) > > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:289) > > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:370) > > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:351) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:171) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:163) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) > > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:104) > > at java.lang.reflect.Method.invoke (Method.java:578) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > > at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) > > > > BUILD FAILURE > > > > Total time: 1.187 s > > Finished at: 2023-02-16T08:14:23-05:00 > > > > Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec > (default-cli) on project Wdax: Command execution failed.: Process exited with > an error: 1 (Exit value: 1) -> [Help 1] > > > To see the full stack trace of the errors, re-run Maven with the -e switch. > > Re-run Maven using the -X switch to enable full debug logging. > > > For more information about the errors and possible solutions, please read the > following articles: > > [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > > > > >
Adding a TestNG Test Case file does not work in NB IDE 16
Hello I am using NB IDE 16 with Gradle 7.6. In the past I have hand-crafted TestNG Test Cases without relying on the Freemarker Templates. I tried and failed to add a TestNG Test Case to my project as follows: 1. From the Projects tab, select the Test Packages [java] in the tree node. 2. RMB menu New > Other ... 3 NB displays the New File Dialog. 4. Choose Unit Tests in Category 5. Select TestNG Test Case 6. Press Next to show the next dialog headed New TestNG Test Case 7. Leave the defaults as is (they look correct) 8 Click the Finish button 9 Dialog box goes away. 10 nothing happens. If I try the same with a new TestNG Test Suite and press the Finish button the dialog box does not disappear and I notice a very fleeting error message, which I struggle to read. I think it says something about an spi file. I could not find a way to fix it myself. Is there a fix that I can apply? Regards
Re: cannot find or load main class - still - again
Are you using "Compile on Save"? I have had occasional problems with that. If you do use it, try to disable it and see if your problem goes away Thomas Christopher C. Lanz schrieb am 16.02.2023 um 14:27: > Hello, > > I am getting this error (output below) about every 4^th time I run a > (large) program for debugging. While clearing the cache _does_ solve the > problem, so does the simple act of adding "//" to an early line in the main > method, or sometimes removing "//" or changing a "/* */" pair. > > First question: > > Does anyone have suggestions about why this happens, and/or how I can > reduce/eliminate the occurrences of the error? > > Second question: > > Does anyone know how to get NetBeans support in the event the community is > unable to help? > > Thanks. > > Chris Lanz > > 340 Dunn Hall, SUNY Potsdam > > lan...@potsdam.edu > > 315 268 1547 > > --- exec-maven-plugin:1.5.0:exec (default-cli) @ Wdax --- > > Error: Could not find or load main class mainPackage.Wdax > > Caused by: java.lang.ClassNotFoundException: mainPackage.Wdax > > Command execution failed. > > org.apache.commons.exec.ExecuteException: Process exited with an error: 1 > (Exit value: 1) > > at org.apache.commons.exec.DefaultExecutor.executeInternal > (DefaultExecutor.java:404) > > at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:764) > > at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:711) > > at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:289) > > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo > (DefaultBuildPluginManager.java:137) > > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 > (MojoExecutor.java:370) > > at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute > (MojoExecutor.java:351) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:215) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:171) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute > (MojoExecutor.java:163) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:117) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject > (LifecycleModuleBuilder.java:81) > > at > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build > (SingleThreadedBuilder.java:56) > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) > > at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) > > at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) > > at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) > > at jdk.internal.reflect.DirectMethodHandleAccessor.invoke > (DirectMethodHandleAccessor.java:104) > > at java.lang.reflect.Method.invoke (Method.java:578) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced > (Launcher.java:282) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch > (Launcher.java:225) > > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode > (Launcher.java:406) > > at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) > > > > BUILD FAILURE > > > > Total time: 1.187 s > > Finished at: 2023-02-16T08:14:23-05:00 > > > > Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec > (default-cli) on project Wdax: Command execution failed.: Process exited with > an error: 1 (Exit value: 1) -> [Help 1] > > > To see the full stack trace of the errors, re-run Maven with the -e switch. > > Re-run Maven using the -X switch to enable full debug logging. > > > For more information about the errors and possible solutions, please read the > following articles: > > [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException > > > > > - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
cannot find or load main class - still - again
Hello, I am getting this error (output below) about every 4th time I run a (large) program for debugging. While clearing the cache does solve the problem, so does the simple act of adding "//" to an early line in the main method, or sometimes removing "//" or changing a "/* */" pair. First question: Does anyone have suggestions about why this happens, and/or how I can reduce/eliminate the occurrences of the error? Second question: Does anyone know how to get NetBeans support in the event the community is unable to help? Thanks. Chris Lanz 340 Dunn Hall, SUNY Potsdam lan...@potsdam.edu 315 268 1547 --- exec-maven-plugin:1.5.0:exec (default-cli) @ Wdax --- Error: Could not find or load main class mainPackage.Wdax Caused by: java.lang.ClassNotFoundException: mainPackage.Wdax Command execution failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:764) at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:711) at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:289) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104) at java.lang.reflect.Method.invoke (Method.java:578) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) BUILD FAILURE Total time: 1.187 s Finished at: 2023-02-16T08:14:23-05:00 Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (default-cli) on project Wdax: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Re: Cannot copy paste code from stackoverflow our other Oracle websites.
Hi Munish Try pasting code in a text file. Then copy code from text file to the java file in Netbeans. What is the error? ~~~ Amitabh On Thu, Feb 16, 2023 at 5:44 PM Munish wrote: > Hi Everyone, > > I am trying to copy paste sample code from a website into my java project > opened in Netbeans. Netbeans does not copy that code. > What am I missing here? Please advise. > > [image: image.png] > > > With regards > Munish >
RE: Cannot copy paste code from stackoverflow our other Oracle websites.
See https://github.com/apache/netbeans/issues/3962 From: Munish Sent: jeudi 16 février 2023 13:15 To: NetBeans Mailing List Subject: Cannot copy paste code from stackoverflow our other Oracle websites. Hi Everyone, I am trying to copy paste sample code from a website into my java project opened in Netbeans. Netbeans does not copy that code. What am I missing here? Please advise. With regards Munish
Cannot copy paste code from stackoverflow our other Oracle websites.
Hi Everyone, I am trying to copy paste sample code from a website into my java project opened in Netbeans. Netbeans does not copy that code. What am I missing here? Please advise. [image: image.png] With regards Munish
Re: Broken links in output window with mvnd build
wouldn't surprise me if the cause is indeed it being a multi-pom project. I don't think I tested that. At least NB 17 will have a working output window for *some* mvnd use cases, links didn't work at all in NB 16 due to the differences in formatting between maven and mvnd. there is always the next release :) best regards, michael On 16.02.23 11:12, Alexander Kronenwett wrote: Toggling the "print maven output logging level" option did not help. I created a small project with a warning but the problem did not occur. Maybe it is because of multi pom project? Using only one thread in mvnd does not solve the problem. I will check again with NB17. Best Alex Alexander Kronenwett schrieb am Mi., 15. Feb. 2023, 21:14: Hello, I am building a multi pom maven project with mvnd. All the warnings in the output window are links and should lead to the respective file and line, where the warning originates. But also the module name and the '[WARN]' prefix are part of the link and hence NetBeans seems not to be able to open the file. I am unsure whether this can be tackled with a setting or I should open an issue. Happens with NB 16 and 17~rc3. Any thoughts? Best Alex
Re: Broken links in output window with mvnd build
Toggling the "print maven output logging level" option did not help. I created a small project with a warning but the problem did not occur. Maybe it is because of multi pom project? Using only one thread in mvnd does not solve the problem. I will check again with NB17. Best Alex Alexander Kronenwett schrieb am Mi., 15. Feb. 2023, 21:14: > Hello, > > I am building a multi pom maven project with mvnd. All the warnings in the > output window are links and should lead to the respective file and line, > where the warning originates. But also the module name and the '[WARN]' > prefix are part of the link and hence NetBeans seems not to be able to open > the file. > I am unsure whether this can be tackled with a setting or I should open an > issue. Happens with NB 16 and 17~rc3. Any thoughts? > > Best > Alex >