Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 198293 - Compile JSP files during build fails with NoClassDefFoundError
Compile JSP files during build fails with NoClassDefFoundError
Status: RESOLVED DUPLICATE of bug 198056
Product: javaee
Classification: Unclassified
Component: JSP
: P3 (vote)
Assigned To: Anton Chechel
Depends on:
  Show dependency treegraph
Reported: 2011-05-03 20:48 UTC by stevefyfe
Modified: 2011-05-26 16:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description stevefyfe 2011-05-03 20:48:50 UTC
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 Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
Could not find the main class: org.netbeans.modules.web.project.ant.JspC.  Program will exit.
Comment 1 stevefyfe 2011-05-03 20:50:34 UTC
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 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 file to look like this:

And I put those jar files into that folder, replacing the ones that were already there. This resolved the problem.
Comment 2 stevefyfe 2011-05-26 16:24:38 UTC

*** This bug has been marked as a duplicate of bug 198056 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo