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 147029 - [65cat] Error badge displaying <identifier expected> on Project creation
Summary: [65cat] Error badge displaying <identifier expected> on Project creation
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP Parser (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Tomasz Slota
URL:
Keywords:
: 147151 147663 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-12 08:07 UTC by rajivderas
Modified: 2008-09-27 05:40 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (62.28 KB, text/plain)
2008-09-12 08:10 UTC, rajivderas
Details
project file (18.54 KB, application/x-compressed)
2008-09-12 08:13 UTC, rajivderas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rajivderas 2008-09-12 08:07:10 UTC
Steps to reproduce:
1) Creat a Java web project with Java EE 5 with only struts and hibernate frameworks selected
2) The finish the project creation wizard 
3) The open the "welcomeStruts.jsp" file in jsp editor you will find an error displaying on the very first line of this 
page dipicting "<identifier expected>"

In the IDE log file their has been a null pointer  exception thrown at this stage so am attaching the project and the 
log file.

Build 200809111401
JDK 6 Update 10
Comment 1 rajivderas 2008-09-12 08:10:46 UTC
Created attachment 69713 [details]
log file
Comment 2 rajivderas 2008-09-12 08:13:31 UTC
Created attachment 69714 [details]
project file
Comment 3 David Konecny 2008-09-16 09:03:08 UTC
*** Issue 147151 has been marked as a duplicate of this issue. ***
Comment 4 David Konecny 2008-09-16 10:37:24 UTC
Looks like basic JSP functionality is broken again. We talked a while ago about creating a commit-validation test which
would catch regression like this as early as possible. Any progress on that Honzo?
Comment 5 Marek Fukala 2008-09-16 12:51:28 UTC
The errors seems to be coming from the jsp-java support, likely "SimplifiedJspServlet" issue => tslota

to reproduce the issue, just put any taglib into an empty jsp file:

---------
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
---------
Comment 6 Tomasz Slota 2008-09-17 15:31:31 UTC
reproducible, started... 
Comment 7 Tomasz Slota 2008-09-17 16:06:41 UTC
I have committed a fix, Tomasi please investigate whether it is a legitimate solution or just a temporary workaround ;-) 

It seems very strange that some VariableInfos returned by TagInfo.getVariableInfo() contain a non-null class name and a null name. If this is expected 
situation please close the issue.

I am downgrading the issue to P3 cos it no longer has any impact on the end users.

PS. I doubt this particular situation would be prevented by better tests but I agree that they need to be improved.
Comment 8 Tomasz Slota 2008-09-17 16:12:02 UTC
Commit log:

http://hg.netbeans.org/main/rev/8da2ed388930
Comment 9 David Konecny 2008-09-17 21:00:38 UTC
Re. "I doubt this particular situation would be prevented by better tests" - this is a second time JSP editor got
recently completely broken even in simplest scenario (create a new web app with WelcomeStruts.jsp) without *being
noticed* for a while. That's not only serious regression but reflects on our processes. Adding a simple
commit-validation test for above scenario would prevent that. I would consider also opening some more complex JSP and
make sure parsing is successful.

Re. fix - it worked around NPE in this instance but I wonder what's the real cause? In that respect this is still P2.
Comment 10 Tomas Mysik 2008-09-17 21:34:06 UTC
> Re. fix - it worked around NPE in this instance but I wonder what's the real cause?

Not sure about "work around" Davide - I think that the cause of this issue is the fix of issue #141287 - look at it 
for more information.
However, I will look at this issue, thanks.
Comment 11 Quality Engineering 2008-09-18 05:31:11 UTC
Integrated into 'main-golden', will be available in build *200809180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8da2ed388930
User: Tomasz Slota <tslota@netbeans.org>
Log: #147029: Error badge displaying <identifier expected> on Project creation
Comment 12 Tomas Mysik 2008-09-18 09:47:15 UTC
I have looked at the JSP specification and there's not so much information there - but I think that the fix is OK. The 
only thing I have found is that we should probably check VariableInfo.getDeclare() before any variable declaration; 
Tomasz is currently looking at it and he will update this issue (feel free to close this issue). Thanks.
Comment 13 Marek Fukala 2008-09-19 09:01:09 UTC
*** Issue 147663 has been marked as a duplicate of this issue. ***
Comment 14 Tomasz Slota 2008-09-26 14:23:22 UTC
I am now also checking VariableInfo.getDeclare(), I verified that the fix still works.

http://hg.netbeans.org/main/rev/5b74b44d1b9b

Comment 15 Quality Engineering 2008-09-27 05:40:19 UTC
Integrated into 'main-golden', will be available in build *200809270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5b74b44d1b9b
User: Tomasz Slota <tslota@netbeans.org>
Log: #147029: Error badge displaying <identifier expected> on Project creation