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.

Bug 226485 - Parsing error reported for correct JSP files
Summary: Parsing error reported for correct JSP files
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP Parser (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-21 22:37 UTC by miu
Modified: 2013-06-21 05:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (72.47 KB, text/plain)
2013-02-21 22:37 UTC, miu
Details
correct jsp with parsing error (2.62 KB, application/octet-stream)
2013-02-27 14:52 UTC, bilaco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description miu 2013-02-21 22:37:25 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Mac OS X version 10.8.2 running on x86_64
Java; VM; Vendor = 1.7.0_15
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

After upgrading to 7.3 from 7.2 some (not all though) JSP files with a JSP comment at the top are flagged with a red exclamation mark in the Projects tree view. Upon opening in the editor even some unflagged JSP files report a problem in the first line, but this doesn't make them flagged in the project tree. "Cannot find symbol" is reported in the editor while the start tag of a comment is highlighted.

This does not affect build and deployment as all JSPs work fine.
Comment 1 miu 2013-02-21 22:37:28 UTC
Created attachment 131700 [details]
IDE log
Comment 2 Martin Fousek 2013-02-22 06:46:18 UTC
Could you attach some sample source where are you facing this issue? Hard to guess why it happens now, without any example. Thanks a lot.
Comment 3 miu 2013-02-22 08:02:43 UTC
I'll have to find out whether I can attach some code, perhaps I can prepare a simple example that will trigger this error.

I reopened the same project in 7.2 and indeed there were no red flags in the project tree panel, however opening JSPs in the editor would cause the first line to be marked red with the same error:

cannot find symbol
  symbol:   variable privilegeType
  location: class SimplifiedJSPServlet
Comment 4 Martin Fousek 2013-02-22 12:24:25 UTC
(In reply to comment #3)
> I'll have to find out whether I can attach some code, perhaps I can prepare a
> simple example that will trigger this error.

This would be great, thanks.
Comment 5 bilaco 2013-02-27 14:52:59 UTC
Created attachment 131967 [details]
correct jsp with parsing error

I sent an attachment with incorrect parser error.
Comment 6 Martin Fousek 2013-02-28 06:27:05 UTC
If you point to the issue with the error badge on the file in project tab, you should get this fixed after releasing first patch. That's duplicate of the issue #225442. I checked your file in the build with the fix and the parsing error disappeared then. Thanks for reporting.

*** This bug has been marked as a duplicate of bug 225442 ***
Comment 7 sanjian 2013-06-14 21:46:52 UTC
I have a same issue.  (recently upgraded from 7.2.1 to 7.3.1)
Is there any fix for this?  where can I get it?

Thanks in advance.
Comment 8 Martin Fousek 2013-06-17 05:26:09 UTC
The original issue complains about the red excalmation mark in the project tab which was caused by JavaScript parser which ran on the attached file.

sanjian you should attach your source where are you facing your issue. It can be caused due to more reasons and hard to say which issue you hit. Thanks.
Comment 9 Martin Fousek 2013-06-20 06:33:27 UTC
Reporter, please attach your source file and then reopen this issue. Without it we are not able to resolve your issue, thanks.
Comment 10 miu 2013-06-20 19:08:24 UTC
(In reply to comment #9)
> Reporter, please attach your source file and then reopen this issue. Without it
> we are not able to resolve your issue, thanks.

While my original report was trying to figure out why some JSP files were erroneously marked as invalid, the real problem was that red exclamation mark badges were propagated all the way up to the project level.

Such false alerts were misleading as it wasn't clear what the project status was - is there a "real" issue like a missing library or a Java syntax error; or is it just that JSP parser doesn't "like" something.

This behavior change occurred upon upgrading from 7.2 to 7.3 and now seems to be back to "normal" in 7.3.1.

Fact is that upon navigating and opening there are many XML and JSP files that will be marked as invalid in the editor while they work fine. This may be due to dynamic inclusions/references that can't be resolved in the editor.

If someone has a particular problem demonstrable with code that they're allowed to share I guess they should open a new bug.
Comment 11 Martin Fousek 2013-06-21 05:29:05 UTC
(In reply to comment #10)
> This behavior change occurred upon upgrading from 7.2 to 7.3 and now seems to
> be back to "normal" in 7.3.1.
> 
> Fact is that upon navigating and opening there are many XML and JSP files that
> will be marked as invalid in the editor while they work fine. This may be due
> to dynamic inclusions/references that can't be resolved in the editor.

I think that we have agreement with the reporter. Thanks Mio for your comment! Because reporter confirmed that the original problem is already gone in NB7.3.1 (it means that this, original bug was fixed), please sanjian enter new issue and attach you JSP file to it - it will be definitely new problem you are facing, the original one was patched. Thanks a lot!