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.
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.
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.
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.
In that case, as you Radim write, the web module is being loaded normally and I don't see any problems there.
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
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.