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.
Build: NetBeans IDE Dev (Build 20080502153545) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21 OS: Windows XP, 5.1, x86 User Comments: Created project with all 4 basic frameworks
Created attachment 60982 [details] stacktrace
*** Issue 134487 has been marked as a duplicate of this issue. ***
It looks like servletjspapi module is not loaded or simply there is no ext/servlet2.5-jsp2.1-api.jar on the runtime classpath.
Tomas may know more about this. I tried following: create new Web Project (with or without Libraries folder - does not matter) and add Struts framework and tick "Add Struts TLD" and result is similar: editor status bar says " PWC6180: Unable to initialize TldLocationsCache" and console shows "SAXException: PWC6181: File /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd not found" - see attachment for more details. Looks like JSP parser classpath is incomplete but I do not know why.
Created attachment 61062 [details] exception
I think this is serious regression. Try creating Web Project with Visual JSF - fails with CNFW and design page is never opened.
*** Issue 134455 has been marked as a duplicate of this issue. ***
Are we able to find out when this situation started to happen? I did not change anything in JSP parser for quite a long time (from january I guess).
Ask QA to try out couple of old builds.
*** This issue has been marked as a duplicate of 134136 ***
closed by mistake
It has nothing to do with frameworks, it happens to me even for pure web project with jsp files. I asked Jinra Sedek to try to find the first build with the problem. The first report AFAIK is issue 131136 against build 080429.
This issue was present in 1.6 when it shipped but not 5.5.1, if that helps any.
I'm able to reproduce the problem using build 200804300004, but it doesn't appear for 200804290004 yet. 29.04. is the day of first problem occurences
In that case, 134455 is *not* a duplicate of this bug, as the problem described in 134455 has been there since 6.0. I'm therefore reopening 134455
Jesse, cannot the problem be caused by your changes from Apr 28th in the following changeset? http://hg.netbeans.org/main?cmd=changeset;node=7ccf89a50f5f There doesn't seem to be any change in the servletjspapi module or those modules which loads classes from it around the date when it stopped working accoring to Jindra's findings. Or any other idea what could be the problem?
I don't know offhand of any reason why the nbjcl -> jar change (intended to affect just ClassLoader.getResource, not loadClass) would cause a NCDFE like this (just in this module and not in any of the many other modules which use CP extensions), though it is possible of course. (Easy enough to verify, no need to guess.) It is certainly suspicious that the class in question is present in four (!) different JARs in NB sources: j2ee.dd/external/javaee-api-5.jar servletapi/external/servlet-2.2.jar servletjspapi/external/servlet2.5-jsp2.1-api.jar web.monitor/external/servlet-2.3.jar Obviously if you can narrow down the problem to a test case demonstrating fault in the module system that would be helpful. BTW I am at JavaOne this week and don't have much time to look at it.
my stacktrace is: SEVERE [org.openide.util.RequestProcessor] java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagAttributeInfo at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:244) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) Caused: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagAttributeInfo at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.filterList(JspSyntaxSupport.java:461) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getTagPrefixes(JspSyntaxSupport.java:475) at org.netbeans.modules.web.core.syntax.completion.JspCompletionQuery.queryJspTagInContent(JspCompletionQuery.java:581) at org.netbeans.modules.web.core.syntax.completion.JspCompletionQuery.query(JspCompletionQuery.java:133) at org.netbeans.modules.web.core.syntax.completion.JspCompletionProvider.queryImpl(JspCompletionProvider.java:192) at org.netbeans.modules.web.core.syntax.completion.JspCompletionProvider$Query.doQuery(JspCompletionProvider.java:110) at org.netbeans.modules.web.core.syntax.completion.JspCompletionProvider$AbstractQuery.query(JspCompletionProvider.java:211) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:218) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
may be a dependency missing in one project ? TagAttributeInfo shuld be here: <dependency> <code-name-base>org.netbeans.modules.servletjspapi</code-name-base> <build-prerequisite/> <compile-dependency/> <run-dependency> <release-version>1</release-version> <specification-version>1.3</specification-version> </run-dependency> </dependency>
Re. "may be a dependency missing in one project" - I had a quick look yesterday but did not find anything. Dependency is there otherwise module would not compile. I sometimes got this exception and sometimes not so its random to some extent.
This issue has already 5 duplicates
i think that the project compile because the class is loaded in ProxyClassLoader(line: 189) class in the method: protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException { at line 244: if (cls == null && shouldDelegateResource(path, null)) cls = systemCL.loadClass(name); // may throw CNFE this can throws a runtime exception
This issue has already 10 duplicates
*** Issue 134844 has been marked as a duplicate of this issue. ***
Reassigning to core for evaluation since it looks like some problem with classloading. The issue appears only sometimes, it is hard to say when exactly. Once it appears any module cannot load any class from the servletjspapi module even after netbeans restart.
> The issue appears only sometimes, it is hard to say when exactly. You can just try to create a new Visual Web project. The NoClassDefFoundError happened ALWAYS! Hence no any new Visual Web project can be created from the current trunk build for > 2 weeks!!
Build: NetBeans IDE Dev (Build 200805110004) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05 OS: Windows XP, 5.1, x86 User Comments: Just installed the 6.1 Dev 200805110004 build. Started it for the first time, and it hung on me when I tried to open an existing JSP file. I shut it down and restarted it and now I get this NoClassDefFoundError. The JSP editor is currently showing a blank gray for the same JSP that I tried to open the first time.
Created attachment 61280 [details] stacktrace
Build: NetBeans IDE Dev (Build 200805110004) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05 OS: Windows XP, 5.1, x86 User Comments: Running NB 6.1 200805110004. Noticed Output window displaying an error ("cvc-complex-type.2.4.d: Invalid content..."). I clicked on the error link in said window and this NoClassDefFoundError appeared. This "Invalid content" error is the same error that I reported in issue #132837 on Tue Apr 15 04:25:00 +0000 2008.
Created attachment 61282 [details] stacktrace
I just did a clean build of a5d6c99ca801 (from today), started on JDK 6 w/ new userdir, and created the "Travel Center" sample project. I was warned that the target server was not set but did not see any NCDFE. Cannot seriously evaluate without reliable (and detailed) steps to reproduce from scratch.
After setting GFv2 as the app server and opening a JSP, I get a java.lang.ClassNotFoundException: com.sun.rave.faces.util.DesignTimeComponentBundle [....] at java.lang.Class.forName(Class.java:164) at com.sun.rave.faces.util.ComponentBundle.getBundle(ComponentBundle.java:145) but I guess that could be some unrelated bug. From inspecting the source code I don't see any obvious reason why it is using reflection at all; appears that it could simply replace try { cb = (ComponentBundle)Class.forName(DESIGN_TIME_IMPL_CLASS).newInstance(); } catch (Exception e) { throw new RuntimeException("Could not create instance of " + DESIGN_TIME_IMPL_CLASS, e); } with cb = new DesignTimeComponentBundle();
I did manage to get a NCDFE on JspException from JavaSourceProviderImpl.FilterImpl.filterCharSequence under some conditions which is probably similar enough to investigate.
I think the root bug is in org.apache.jasper.compiler.TldLocationsCache.scanJar, which closes a JarFile it did not create; in #7ccf89a50f5f I honored the contract of JarURLConnection.getJarFile, which TLC.sJ seems to abuse. The problem in the form of an ISE was being masked by JarClassLoader.JarSource.resource.
Can work around Jasper bug: #7d33b9d2ed38 (will push to core-main).
*** Issue 134584 has been marked as a duplicate of this issue. ***
Integrated into 'main-golden', available in NB_Trunk_Production #195 build Changeset: http://hg.netbeans.org/main/rev/7d33b9d2ed38 User: Jesse Glick <jglick@netbeans.org> Log: #134424: NCDFEs ultimately due to a bug in Jasper (closes foreign JarFile's).