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 40274 - Second deployment fails
Summary: Second deployment fails
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-19 13:21 UTC by Milan Kuchtiak
Modified: 2009-11-07 11:38 UTC (History)
0 users

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 Milan Kuchtiak 2004-02-19 13:21:44 UTC
The first start is OK.
The second deployment after stopping Tomcat fails.

The web module stays in the "stopped" status.
Comment 1 Milan Kuchtiak 2004-02-19 13:23:34 UTC
The exception from output window :

19.2.2004 14:13:44 org.apache.catalina.core.StandardContext start
SEVERE: Exception during cleanup after start failed
LifecycleException:  Container StandardContext[/test9] has not been
started
        at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4402)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4300)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
Comment 2 Marek Fukala 2004-02-19 17:28:18 UTC
This is most likely caused by the missing docBase attribute in the
context.xml. 
Since the last Pavel's fix the file context.xml is used during the
deployment directly. The tomcat saves the file into
$CB/conf/Catalina/host/ directory without doing any change. 
The file does contain only the path attribute but does NOT contain the
docBase. The next tomcat server start causes that these webmodules
cannot be started since tomcat has no idea where the docBases are (it
only unsuccessfully tries to find them in the default 'webmodules'
directory)
The fix could be to put the docBase attribute into the
META-INF/context.xml file during deployment from the IDE.
Comment 3 Pavel Buzek 2004-02-19 22:57:11 UTC
This is a regression caused my fix of 40128, thanks for catching this
- I did not test start/stop, only deploy/redeploy.

Tomcat does not add the docBase into module xml file in
conf/Catalina/localhost if deployed using context.xml (as it does when
deploying with path). So I had to add docBase into context.xml file
which by itself is good. The only problem is that j2eeserver api does
not allow me to do it during creation of web module (or creation of
context.xml) and I have to add docBase before first deployment (see
$40304). The consequence of this is that the META-INF/context.xml file
is changed and saved when you first deploy the web module if it doed
not have the correct docBase in it.

BTW: The manager application page in Tomcat5 documentation describes
an example of deploying with just context.xml file, the path and
docBase being specified in the file:

http://localhost:8080/manager/deploy?config=file:/path/context.xml

This does not work for me so I have to put the war parameter into URL
even though it is already specified in context.xml.
Comment 4 Marek Fukala 2004-02-20 12:12:38 UTC
verified - now the context.xml form the META-INF dir, which is used to
deploy the wm, contains docBase attribute.
Comment 5 Marian Mirilovic 2009-10-01 14:48:10 UTC
reopen to fix status and resolution
Comment 6 Marian Mirilovic 2009-10-01 14:50:46 UTC
fix status and resolution