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 101671 - Exception on creating a new VWP (j2ee5) project with Tomcat6 as target server
Summary: Exception on creating a new VWP (j2ee5) project with Tomcat6 as target server
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks: 99509
  Show dependency tree
 
Reported: 2007-04-19 01:05 UTC by Yousuf Haider
Modified: 2007-05-02 17:30 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error log (5.59 KB, text/plain)
2007-04-19 01:06 UTC, Yousuf Haider
Details
How it looks in ide (137.18 KB, image/png)
2007-04-19 11:20 UTC, Dan Kolar
Details
Exception in IDE (194.09 KB, image/jpeg)
2007-04-19 16:20 UTC, Yousuf Haider
Details
Exception Dialog (176.79 KB, image/jpeg)
2007-04-20 18:41 UTC, Yousuf Haider
Details
Exception (3.21 KB, text/plain)
2007-04-20 18:42 UTC, Yousuf Haider
Details
Exception on build 200704240830 (4.04 KB, text/plain)
2007-04-24 17:41 UTC, Yousuf Haider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Haider 2007-04-19 01:05:57 UTC
NBI Build 200704180000


Steps to recreate:
1. Download Apache Tomcat 6.0.10 and add it as an external server.
1. New Project->Web->Web Application
2. Select 
    -Tomcat 6.0 as target server
    -Java EE version: Java EE 5
3. Select Visual Web Server Faces as the Framework and click Finish.

As soon as it opens up there is a Null pointer exception. Attached is the
complete error log.

This issue will not arise in the following 2 conditions:

1. If you create a simple web app without using the Visual Web Server Faces
Framework.
2. If you create a web app with the Visual Web Server Faces framework but with
Java EE version set to J2EE 1.4 or lower.
Comment 1 Yousuf Haider 2007-04-19 01:06:54 UTC
Created attachment 41211 [details]
Error log
Comment 2 Dan Kolar 2007-04-19 11:20:43 UTC
Created attachment 41237 [details]
How it looks in ide
Comment 3 Yousuf Haider 2007-04-19 16:17:58 UTC
The source file error is because Tomcat does not have the necessary jar files in
its lib folder. That is normal dkolar. 

 My problem is why is it giving an exception dialog when opening up. It
shouldn't do that. I am attaching a screenshot of the exception below.
Comment 4 Yousuf Haider 2007-04-19 16:20:01 UTC
Created attachment 41267 [details]
Exception in IDE
Comment 5 Dan Kolar 2007-04-19 17:26:49 UTC
I don't think NB behavior is 'normal' in this bug. It just created project on
half-way, when exception finally poped up and broke the process. Usually such
exception pop-up first and process of creating is stopped on its very beginning,
when there's smth badly wrong, like in this case.
Comment 6 Yousuf Haider 2007-04-20 18:37:27 UTC
I tested this again on todays NBI build : 200704200000

Now its gotten worse. When you open the project a null pointer exception comes
up. I've attached the exception details.

The Source file error on the design view never comes up. The hourglass cursor
stays there permanently. Clicking anywhere will throw the same exception again.
Netbeans iteself does not hang since I can actually open up the java and jsp
file and open the Project node by repeatedly trying to click on them.

I closed the project, deleted the project manually and had to restart the IDE
for the problem to go away.
Comment 7 Yousuf Haider 2007-04-20 18:41:43 UTC
Created attachment 41360 [details]
Exception Dialog
Comment 8 Yousuf Haider 2007-04-20 18:42:11 UTC
Created attachment 41361 [details]
Exception
Comment 9 _ potingwu 2007-04-20 18:52:18 UTC
Since Tomcat doesn't bundle JSF libraries (jsf-api & jsf-impl), if you don't
copy these jars into your Tomcat install dir, then insync and designer will not
work.

It's not a deployment issue. Your project is even not build yet!

Insync needs these jars for further procesing. I'm not sure if insync can calm
down the error mesg.
Comment 10 Yousuf Haider 2007-04-20 18:59:28 UTC
I think you are referring to the deployment issue which is a separate issue that
I filed here:

http://www.netbeans.org/issues/show_bug.cgi?id=101689

That issue occurs only if you copy the jars and then try deploying. More details
on the issue page.
Comment 11 _ potingwu 2007-04-20 19:11:22 UTC
No, the exceptions are from insync and designer.

BTW, we don't have this issue for J2EE1.4/JSF1.1 project is because we have
JSF1.1 design-time libraries in the project classpath and delaying the issue
till run-time. You still can't deploy it to Tomcat 6 without copying these
needed jars.

I don't think this is a P1 issue because 'copying JSF jars to Tomcat' is needed
for deploying JSF app. P3 is just for insync/designer to make the exceptions less.
Comment 12 _ sandipchitale 2007-04-20 19:49:45 UTC
Adding the required libraries based on what server is chosen is the function 
of Project+VW Framework.

I think use to have such logic before (ask Marco)
Comment 13 _ potingwu 2007-04-20 20:02:50 UTC
No, we never add 'deploy jars' to Tomcat5, NetBeans bundle them. And for using
external installed Tomcat, users need to copy the jars explicitly.

This bug is about the 'bad' exceptions from insync and designer.

If you can't fix the exceptions, then we need to close it as "WONTFIX".
Comment 14 Dan Kolar 2007-04-21 14:39:59 UTC
This exceptions is definitely NOT a P3. Impossibility of creating web project
isn't P3. We support Tomcat 6, this issue should be fixed.
Comment 15 _ sandipchitale 2007-04-21 18:24:47 UTC
The NPE has been fixed.

See: http://www.netbeans.org/issues/show_bug.cgi?id=102031

The project creation (framework) logic should add the required libraries if 
they are not avaliable in the selected server. Alternatively if the server is 
not supported by the framework the wizard should not be allowed to be finished 
with the proper error message to the user.
Comment 16 _ sandipchitale 2007-04-21 19:06:53 UTC
Please note that this is not a deployment issue. If you try to build the 
project it will fail to compile.

The syntax errors shown in the screenshot are not coming from designer or 
insync. The syntax errors are coming from the Java editor because the imported 
classes are not on the classpath. Insync simply gets these error from Java 
editor and designer simply displays them.
Comment 17 _ potingwu 2007-04-22 03:49:07 UTC
We do support Tomcat 6, but we require users to setup their Tomcat to be ready
for JSF. This is not a visualweb issue. This is a web project general requirement.

I.e., if you don't add required jars file into the Tomcat 6, then even web
project + JSF framework cannot deploy JSF.

Deployment issue is already filed in Issue#101689. This bug is for the
'EXCEPTIONS' that insync fixed as Sandip said in,
http://www.netbeans.org/issues/show_bug.cgi?id=102031.

Please discuss the 'DEPLOYMENT' issue in issue#101689.
Comment 18 Yousuf Haider 2007-04-24 17:40:54 UTC
I am still getting a NPE on project creation. I am attaching the the exception file.

Once I close the exception dialog the design view(with the source file errors)
doesn't come up. The screen stays blank. Clicking on JSP or Java causes the same
exception to reappear. 
Comment 19 Yousuf Haider 2007-04-24 17:41:56 UTC
Created attachment 41568 [details]
Exception on build 200704240830
Comment 20 Yousuf Haider 2007-04-24 19:26:53 UTC
Reassigning this issue after discussion with Sandip. The NPE is related to the
visual editor subcomponent.
Comment 21 Peter Zavadsky 2007-04-24 20:43:16 UTC
Fixing the NPE, and passing back (the NPE is only a consequence of the probably
invalid state).
Checking in
visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java,v
 <--  JsfForm.java
new revision: 1.65; previous revision: 1.64
done
Comment 22 _ potingwu 2007-04-24 21:42:09 UTC
Exceptions fixed. For deployment, should file new bug against server plugin;
don't show non-ready server/EE-version in web project wizard.
Comment 23 Yousuf Haider 2007-05-02 17:30:23 UTC
verified with build 200705010900