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.
After upgrade from NB 6.9.1 to NB 7.0, a web project that has the option "Test compile all JSP files during builds" enabled will fail due to wrong classpath for the JSP Compiler. The reported error is: java.lang.NoClassDefFoundError: org/netbeans/modules/web/project/ant/JspC Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.web.project.ant.JspC 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:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: org.netbeans.modules.web.project.ant.JspC. Program will exit.
I diagnosed it as a problem with the upgrade from NB6.9 to NB7.0. NB6.9 had installed a library in my project specific library folder, but when NB7 was installed, it did not change the contents of that library. So NB7 tried to compile the JSPs using the classpath intended for NB6.9, which failed. I created a new project and compared the nblibraries.properties file from the new project with my original project. I found a library defined in both named jsp-compilation but the jar files defined in that library did not match. To fix the problem I had to upgrade that library by hand. I changed the nblibraries.properties file to look like this: libs.jsp-compilation.classpath=\ ${base}/jsp-compilation/ant.jar:\ ${base}/jsp-compilation/servlet3.0-jsp2.2-api.jar:\ ${base}/jsp-compilation/glassfish-jspparser-3.0.jar:\ ${base}/jsp-compilation/jsf-api.jar:\ ${base}/jsp-compilation/jstl.jar:\ ${base}/jsp-compilation/ant-launcher.jar And I put those jar files into that folder, replacing the ones that were already there. This resolved the problem.
*** This bug has been marked as a duplicate of bug 198056 ***