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.
Summary: | Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) | ||
---|---|---|---|
Product: | platform | Reporter: | Tomas Mysik <tmysik> |
Component: | Filesystems | Assignee: | Jiri Skrivanek <jskrivanek> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | aabraham, ammarabdulsalam, bonji3, completeman, hkhan_2004, jerouris, limlom, mfukala, mhonores, nvidura, pjiricka, pz0513, rajivderas, rbrink, shpimenta, tslota, tutahh, xbennes, zeroreturn |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=18833 | ||
Issue Type: | DEFECT | Exception Reporter: | 18833 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace |
Description
Tomas Mysik
2008-02-29 13:08:15 UTC
Created attachment 57534 [details]
stacktrace
This issue has already 10 duplicates Build: NetBeans IDE Dev (Build 200803171203) VM: Java HotSpot(TM) Client VM, 1.6.0_10-ea-b07 OS: SunOS, 5.11, x86 User Comments: I had open jspf file and few other files. This exception rised while I were switching editor focus to the jspf file pane. Created attachment 58655 [details]
stacktrace
Build: NetBeans IDE 6.1 Beta (Build 200803050202) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05 OS: Windows XP, 5.1, x86 User Comments: Created attachment 59646 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200804030004) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments: Switching editor tab to JSP page. This happened a lot when I open up .jsp files but I usually use JSP documents so it's not that big of a deal Created attachment 59794 [details]
stacktrace
Build: NetBeans IDE 6.1 Beta (Build 200803050202) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05 OS: Windows XP, 5.1, x86 User Comments: Created attachment 59840 [details]
stacktrace
This issue has already 20 duplicates Build: NetBeans IDE Dev (Build 080423) VM: Java HotSpot(TM) Client VM, 1.5.0_15-b04, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_15-b04 OS: Linux, 2.6.25-gentoo-r1, i386 User Comments: - create header.jspf in /WEB-INF - drag&drop header.jspf under the Web Pages node => exception Created attachment 60610 [details]
stacktrace
This issue has already 50 duplicates Build: NetBeans IDE Dev (Build 080731) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86 User Comments: Editing JSP file Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:211) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:262) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:184) Created attachment 66191 [details]
stacktrace
Created attachment 66192 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200807310201) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12 OS: Windows XP, 5.1, x86 User Comments: Deleted a directory and opened a JSP file Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:211) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:262) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:184) Created attachment 66370 [details]
stacktrace
209 duplicates so far ... I'll take a deeper look at it. Thanks for reminding me. Build: NetBeans IDE Dev (Build 200808261401) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86 User Comments: when editing jsp file Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:210) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:262) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:184) Created attachment 68539 [details]
stacktrace
It looks like there isn't an instance of JspContextInfo registered in the filesystem in folder J2EE/JSPSyntaxColoring/<the passed fileobject mimetype>. For text/x-jsp and text/x-tag we provide our own impl delegating to the jsp parser. For other mimetypes it is up to the lang. support provider. For now I have improved the exception so its message contains information about the passed fileobject and its mimetype. Then, one someonw reports the issue on a build with the fix, we can investigate more. Possible solution would be a fallback to the default jsp parser based implementation, but I would prefer to know the real reason first. I'll do the fallback + logging of the errorneous state if noone reports the issue on lastest build in a week. changeset: 98760:4334ef9aa4e6 tag: tip user: Marek Fukala <mfukala@netbeans.org> date: Thu Aug 28 17:17:07 2008 +0200 summary: better logging for #128818 Build: NetBeans IDE 6.5 Beta (Build 200808111757) VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25 OS: Windows Vista, 6.0, x86 User Comments: when open jsp file Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:211) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:262) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:184) Created attachment 68574 [details]
stacktrace
*** Issue 138215 has been marked as a duplicate of this issue. *** Build: NetBeans IDE Dev (Build 080911) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b30 OS: Windows XP, 5.1, x86 User Comments: 1, create WebProject 2, create any jsp file in web/WEB-INF 3, drag and drop this file into Web Pages Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support); instance path = /J2EE/JSPSyntaxColoring/content/unknown; fileObject = C:/Documents and Settings/Administrator/My Documents/NetBeansProjects/EnterpriseApplication5/EnterpriseApplication5-war/web/WEB-INF/js.jsp at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:210) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:265) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:187) Created attachment 69624 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200809120201) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28 OS: Linux, 2.6.24-19-generic, i386 User Comments: editing a Facelets template (XHTML) in WEB-INF/templates Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support); instance path = /J2EE/JSPSyntaxColoring/content/unknown; fileObject = mnt/common/netbeans/phoenix/phoenix-war/web/templates/mainTemplate.xhtml at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:117) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:129) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:210) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getPrefixMapper(JspSyntaxSupport.java:220) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getTagLibrary(JspSyntaxSupport.java:277) Created attachment 69755 [details]
stacktrace
I can reproduce the problem with dragging and dropping the file node if the file is opened in editor. Thanks. At least partially fixed the problem. JspSyntaxSupport holds a reference its document fileobject. When the file is moved or somehow else invalidated and the document still exists the invalid fileobject may be passed to the JspContextInfo.getContextInfo() which will then throw the exception since the invalidate fileobject mimetype is content/unknown. The fix ensures the fileobject backing up the document is always fresh or null. The fix mainly solves the reports where SimplifiedJSPServlets plays its role. I am not completely sure if the other reports (e.g. editing a Facelets template (XHTML) in WEB-INF/templates) are the same case. I'll close the issue and we will see if anyone again complains about the problem (will be in fact different issue that the one just fixed, but with similar effect). changeset: 101459:5ce74cb5ccd8 tag: tip user: Marek Fukala <mfukala@netbeans.org> date: Fri Sep 12 18:19:00 2008 +0200 summary: #128818 - Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) Integrated into 'main-golden', will be available in build *200809130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5ce74cb5ccd8 User: Marek Fukala <mfukala@netbeans.org> Log: #128818 - Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support) Reopening - reproduced in NetBeans IDE Dev (Build 200810160201) http://statistics.netbeans.org/exceptions/detail.do?id=128908 rajivderas, did you do some changes in resolving mimetypes? Can you please specify what did you do when the exception appeared? From the error message it is clear that your .jsp file is resolved to text/xml mimetype. i went to the jsp file property pallet and entered */ in to the name field property then i came to the jsp editor and tried to format the file and boom thanks, I can reproduce the issue now. 1) open a JSP file 2) open properties window 3) select name property 4) type */ and press enter => the file name is changed to .jsp => the reported exception is thrown => the file has text/xml mimetype => no jsp features works Lowering the priority since the scenario is pretty uncommon. As I can see it, there are several problems: 1) the property value accepts */ value and then incorrectly renames the file 2) the mime resolved doesn't resolve the file properly even the extension is jsp *** Issue 150379 has been marked as a duplicate of this issue. *** *** Issue 152496 has been marked as a duplicate of this issue. *** *** Issue 152500 has been marked as a duplicate of this issue. *** this issue should not be marked as INCOMPLETE no more. I'm affraid with so many duplicates it is not an "uncommon" scenario - probably there are more ways how to reproduce the problem IMHO the problem is in the property editor allowing the simple slash as a new value. Then the file becomes .<extension> so the extenstion is not considered as extension but as a filename. FileObject's mimetype then changes to content/unknown and many features stops working besides the file becomes hidden in the explorer views. I added a check to avoid slashes in filename for rename. I also added Utilities.isJavaIdentifier check to JspDataObject.handleRename. Please, review if it is appropriate. http://hg.netbeans.org/core-main/rev/bfae38163bea Integrated into 'main-golden', will be available in build *200812070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/bfae38163bea User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #128818 - Avoid rename for invalid names. This issue was originally marked as duplicate of issue 128818, that is already fixed. This issue is still valid, so this seems to be another issue, but it might be related. Build: NetBeans IDE Dev (Build 200904011705) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Windows XP, 5.1, x86 User Comments: moving a jsp file to WEB-INF/jsp Stacktrace: java.lang.Exception: JSP syntax coloring cannot find any provider of context (this is expected to be provided by web module support); instance path = /J2EE/JSPSyntaxColoring/content/unknown; fileObject = D:/manthan/WebApplication1/web/helloView.jsp at org.netbeans.modules.web.core.syntax.spi.JspContextInfo.getContextInfo(JspContextInfo.java:114) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:165) at org.netbeans.modules.web.core.syntax.JspUtils.getCachedParseResult(JspUtils.java:177) at org.netbeans.modules.web.core.syntax.JspSyntaxSupport.getParseResult(JspSyntaxSupport.java:220) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.processIncludes(SimplifiedJSPServlet.java:263) at org.netbeans.modules.web.core.syntax.SimplifiedJSPServlet.process(SimplifiedJSPServlet.java:189) Created attachment 81346 [details]
stacktrace
|