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 31983 - Web module redeployments fails when context was not deployed
Summary: Web module redeployments fails when context was not deployed
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-13 16:23 UTC by _ rkubacki
Modified: 2004-08-13 12:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2003-03-13 16:23:59 UTC
Create web module with servlet. Make some mistake
that will disallow its deployment such as mistake
in web.xml. Execute it - tomcat (4.0.6 in this
case) starts, logs messages that context cannot be
loaded, browser shows that the page is not available.

Now modify servlet and execute it (it will be
compiled before). The result is that reloading fails.

So we need either to fix it now or to turn off
redeployment.
Comment 1 Milan Kuchtiak 2003-03-14 17:15:52 UTC
In that case : the warning message should appear :

"The web module cannot be reloaded. Reason: FAIL - Encountered Exception
java.lang.IllegalStateException: Container StandardContext[/test3] has
not been started"

I don't think it is a serious bug.

These warnings should have notified users that something bad had
happened before :

1. The user should be aware that web module is not correcrly  loaded
because the browser should display the HTTP Error 404

2. SAXParseParse exception should be visible in the web module log file :
For example:
PARSE error at line 51 column 18
org.xml.sax.SAXParseException: The element type "web-app" must be
terminated by the matching end-tag "</web-app>".

3. DD node should be marked with a red cross.

I think that the priority could be lowered to P4.
I changed the Target Milestone to 4.0.
Comment 2 _ rkubacki 2003-03-17 08:17:59 UTC
I expect similar behaviour also when web.xml is well-formed but
semantically incorrect (like servlet mapping for non-existing servlet,
bad reference to ejb/resource-references and so on.
Comment 3 Milan Kuchtiak 2003-03-17 08:41:54 UTC
In that case, as you Radim write, the web module is being loaded
normally and I don't see any problems there. 
Comment 4 Milan Kuchtiak 2004-01-23 09:43:32 UTC
The issue is reproducible even for Tomcat5, with slightly different
behaviour.

Steps :

- Make an error in web.xml and save the invalid dd.
- execute the web module/servlet

An exception message appears :
=====================================================
Annotation: Exception occurred in Request Processor
java.lang.NullPointerException
	at
org.netbeans.modules.j2ee.deployment.impl.TargetServer$IncrementalEventHandler.handleProgressEvent(TargetServer.java:280)
	at
org.netbeans.modules.tomcat5.progress.ProgressEventSupport.fireHandleProgressEvent(Unknown
Source)
	at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(Unknown Source)
	at org.openide.util.Task.run(Task.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:680)
========================================================
The ide.log shows :
============================
[catch]java.lang.Exception: FAIL - Application at context path /test1
could not
be started
============================

There are 2 issues here :
1. The exception message doesn't say much about the problem
2. The progress dialog stays opened
Comment 5 Pavel Buzek 2004-04-27 19:15:57 UTC
I tested this is trunk and it works for me. The first deployment with
invalid xml fails but when I fix it and rebuild the project then the
next Run will execure it OK. It was probably fixed as part of some
other issue.