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 114380 - Unable to create second page
Summary: Unable to create second page
Status: RESOLVED WORKSFORME
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ potingwu
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-08-31 14:40 UTC by Lark Fitzgerald
Modified: 2007-09-01 03:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exceptions I got (2.01 KB, text/plain)
2007-08-31 17:41 UTC, _ potingwu
Details
exception (9.86 KB, text/plain)
2007-08-31 18:19 UTC, Lark Fitzgerald
Details
lark full messages.log (48.87 KB, text/plain)
2007-08-31 18:25 UTC, Lark Fitzgerald
Details
page3.java (5.16 KB, application/octet-stream)
2007-08-31 18:32 UTC, Lark Fitzgerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2007-08-31 14:40:13 UTC
Found by automation, reproducible on:
Product Version: NetBeans 6 IDE Dev (Build 200708300000) 
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04 
Glassfish: 58c
Woodstock 4.1: 200708301215

Steps:
1. Fresh userdir
2. create EE5 project
3. Right click project > Web Pages and choose New > Visual Web JSF Page...

Page2 opens with a Source File Error

"There are errors in the page document, either in the JSP source or the Java source.  These errors are listed below 
and must be corrected in order to resume visual design of the page.

Note: the markup must be valid JSPX, not HTML. This is similar to XHTML, except that the entities must be escaped one 
estra level, so   in XHTML should be written ad  .

Click on the error to go to its location in the source.

Click Fix HTML Errors to automatically fix some common HTML errors."

Note that both Fix HTML Errors, and Preview... button are disabled.

The project name has a red exclamation mark and so do the source packages.


The java source page shows an error message at:

public class Page1 extends AbstractPageBean {

The exclamation says: Page1 is public, should be declared in a file named Page1.java

Note: This is in Page2.java... insync?
Comment 1 Lark Fitzgerald 2007-08-31 15:11:04 UTC
Renaming Page1 to Page2 for both (below) works around the problem: 

public class Page2 extends AbstractPageBean {
and
    /**
     * <p>Construct a new Page bean instance.</p>
     */
    public Page2() {
    }
Comment 2 _ sandipchitale 2007-08-31 15:40:18 UTC
Looks like the class name change after the template instantiation is not happening. 

- Did something change in page templates?
- Did something change in JsfJavaDataLoader?

Lark,

- are you able to create a second class in a simple Java project?
Comment 3 _ potingwu 2007-08-31 17:40:08 UTC
Before I updated my insync this morning, I didn't have this issue. After I did and got below update, I received similar
error:

  P src/org/netbeans/modules/visualweb/insync/faces/refactoring/RenameElExpressionReferencesRefactoringElement.java

A warning dialog shows below when creating a second page:
  ; might be because your user directory is on a Windows UNC path (issue #46813)? If so, try using mapped drive letters.
Comment 4 _ potingwu 2007-08-31 17:41:03 UTC
Created attachment 47902 [details]
Exceptions I got
Comment 5 _ sandipchitale 2007-08-31 18:05:09 UTC
1. I am not able to reproduce it with this mornings checkout.

2. The insynca change that Po-ting refers to comes into play only when the use invokes Undo of Rename refactoring.
Comment 6 _ sandipchitale 2007-08-31 18:10:31 UTC
BTW I tried it on linux. Also I did not have spaces in the path.

The exception which Po-ting is seeing:

Illegal character in path at index 18: file:/C:/Documents and Settings/

seems to point to the space after the word Documents in the path.

1. Is Lark seeing this exception which causes the stated problem. If so this bug should be assigned to java/source
(Retouche). If not file a separate bug for that exception against java/source and continue investigation of this one.
Comment 7 Lark Fitzgerald 2007-08-31 18:18:40 UTC
I'm not seeing anything like that.  I tried again with Page3 and attached the full error.  heres the first part.

INFO [org.netbeans.modules.visualweb.designer.jsf.JsfForm]
java.lang.NullPointerException: Invalid FacesModel, it has null LiveUnit, facesM
odel=org.netbeans.modules.visualweb.insync.models.FacesModel@20cace[ file: Page3
.jsp]
Comment 8 Lark Fitzgerald 2007-08-31 18:19:23 UTC
Created attachment 47903 [details]
exception
Comment 9 _ sandipchitale 2007-08-31 18:20:52 UTC
I tried on linux with spaces in the path. I was not able to reproduce.
Comment 10 Lark Fitzgerald 2007-08-31 18:25:30 UTC
Created attachment 47904 [details]
lark full messages.log
Comment 11 _ sandipchitale 2007-08-31 18:26:21 UTC
That is an informational exception from designer. Something has gone wrong prior to the exception. Can you confirm that
in  Page3 case also the .java file contains Page1 as you reported initially?
Comment 12 _ potingwu 2007-08-31 18:29:34 UTC
I may mislead the direction by showing maybe different issue; please ignore the UNC path issue, I will investigate that
more. But from the exceptions Lark see, they are from insync.

BTW, page template and jsfloader did not change recently.
Comment 13 Lark Fitzgerald 2007-08-31 18:30:59 UTC
Yes, Page3 has references to Page1 in it.  I will attach the .java file.
Comment 14 Lark Fitzgerald 2007-08-31 18:32:21 UTC
Created attachment 47905 [details]
page3.java
Comment 15 _ potingwu 2007-08-31 18:33:57 UTC
Lark, what do you mean?
> Renaming Page1 to Page2 for both (below) works around the problem: 
Comment 16 _ potingwu 2007-08-31 18:37:54 UTC
If the workaround is just simply replace alll "Page1" in Page2.java file, then I believe that this is coming from
insync; "Page1" in the new Page2.java file.
Comment 17 Lark Fitzgerald 2007-08-31 18:39:02 UTC
> Lark, what do you mean?
>> Renaming Page1 to Page2 for both (below) works around the problem: 

If I go to the java source, and change 
public class Page1 extends AbstractPageBean
to
public class Page2 extends AbstractPageBean

and
    /**
     * <p>Construct a new Page bean instance.</p>
     */
    public Page1() {
    }
to
    /**
     * <p>Construct a new Page bean instance.</p>
     */
    public Page2() {
    }

The page error goes away.
Comment 18 _ sandipchitale 2007-08-31 18:48:36 UTC
I do not think insync renames the name of the class after instantiation of the template. I think the project code
instantiates the page template.
Comment 19 _ potingwu 2007-08-31 19:12:58 UTC
I just did a full workspace cvs and build, with or w/o new userdir. No such issue and everything works correctly!

Please try to get the latest build again to see whether you can reproduce it or not. Reopen if necessary.
Comment 20 Lark Fitzgerald 2007-08-31 19:37:20 UTC
I just installed 200708310000 from the .zip (since the installers are broken) and it WORKS!  The automation was run 
last night using the 0830 build, and that's the same build I used to re-create the issue on both jdk 1.6.0_02, and 
jdk1.5.0_12.  After switching to 0831, I can no longer see it for both jdk's.
Comment 21 _ krystyna 2007-09-01 02:00:30 UTC
I could not reproduce this bug this morning as I was using command line to launch NB. 
Once I switched to using the desktop icon on WinXP to launch Netbeans, I reproduced the Source 
File Error that Lark was seeing. We don't have a later installer build other than 08300000 but I
suspect problem is still there because using command line and attempting to create the second 
page threw that odd Warning dialog about Window UNC path error to the screen in both 08300000 and
the 0831 zip. May or may not be related but we need to check the next installer build.  I'll 
close if it's no longer reproducible. This error can be reproduced by  using the 08300000 installer build and launching
by the icon. I removed previous .netbeans/dev userdir.

reproduced on XP and Solaris 10.
Comment 22 _ potingwu 2007-09-01 03:43:52 UTC
I think we should do the reverse way; if you see it in the next installer, then reopen this issue.

The reason I suggest so is, this morning I saw the UNC warning. But after I did a full update, it disappear.

And the most important part is, this issue is a P1 bug because Lark sees "Page1" in file Page2.java. And now you can
reproduce is what I suspected; the UNC path, and that is just a warning dialog. I.e., not a P1.

Action Items:
- If you see "Page1" in file Page2.java, then reopen this issue.
- If you see the UNC warning, file bug against NetBeans some category.
- If you don't see anything, then that's good.