This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I deployed a webapp(springframework 3.0.8) on tomcat in debug mode. Then I tried to run a main() in a file inside the same progect by pressing shift+F6 inside netbeans while the class is open in editor and the focus(cursor) is inside editor. The project is maven based. Then the error prompts(asking me to report the bug) and says: java.lang.IllegalStateException: Fold has been already finished. at org.netbeans.core.output2.NbIO$IOFoldingImpl$NbIoFoldHandleDefinition.finish(NbIO.java:594) at org.openide.windows.FoldHandle.finish(FoldHandle.java:69) at org.netbeans.modules.maven.execute.cmd.ExecutionEventObject$Tree.finishFold(ExecutionEventObject.java:223) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.processExecEvent(CommandLineOutputHandler.java:437) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.trimTree(CommandLineOutputHandler.java:525) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.completeTreeAtEnd(CommandLineOutputHandler.java:398) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.access$1300(CommandLineOutputHandler.java:90) at org.netbeans.modules.maven.execute.CommandLineOutputHandler$Output.run(CommandLineOutputHandler.java:345) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042) Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to at org.openide.util.RequestProcessor.post(RequestProcessor.java:424) at org.netbeans.modules.maven.execute.CommandLineOutputHandler.setStdOut(CommandLineOutputHandler.java:168) at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212) [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153) -------------------- this is the output of executing the file: ------------------------------------------------------------------------ Building AuthenticationServer 1.1.0 ------------------------------------------------------------------------ --- exec-maven-plugin:1.2.1:exec (default-cli) @ authenticationServer --- java.lang.NoClassDefFoundError: com/ibm/mq/MQException Caused by: java.lang.ClassNotFoundException: com.ibm.mq.MQException at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: com.sabapardazesh.authenticationServer.test.orm.MQSendMessage. Program will exit. Exception in thread "main" [INFO] NETBEANS-ExecEvent:{"mojo":{"id":"org.codehaus.mojo:exec-maven-plugin:1.2.1","source":"CLI","execId":"default-cli","goal":"exec"},"exc":{"msg":"Q29tbWFuZCBleGVjdXRpb24gZmFpbGVkLg=="},"type":"MojoFailed"}
1 - First I resoved the ClassNotFoundException on com.ibm.mq.MQException, and the ClassNotFoundException was yet throwing due to the lack of an other class, but the error did not happen! 2 - Then I resolved all the lacks in classpath and it didn't happen again.
*** This bug has been marked as a duplicate of bug 232316 ***