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 40837 - It's not possible to deploy another webmodule to the same context
Summary: It's not possible to deploy another webmodule to the same context
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
: 40540 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-08 17:47 UTC by Marek Fukala
Modified: 2004-09-13 18:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.lang.IllegalStateException: Context path is already in use (5.24 KB, text/plain)
2004-03-08 17:48 UTC, Marek Fukala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2004-03-08 17:47:37 UTC
[20040308-trunk]
Try do deploy a webmodule with context set to an
existing one (not deployed by the IDE - e.g. one
of the tomcat's defaults like /,
/servlets-examples, /balancer, ...). 
The deployment fails with an exception in catalina
output (attached). 
The workaround is to manually undeploy the
existing webmodule via web manager app. or server
instance node.
I suspect it's more general problem - I probably
applies for all webmodules which are not created
(deployed) by the IDE (they do not have an entry
in .nbattrs)?!?!
Comment 1 Marek Fukala 2004-03-08 17:48:23 UTC
Created attachment 13883 [details]
java.lang.IllegalStateException: Context path  is already in use
Comment 2 Pavel Buzek 2004-03-09 21:51:58 UTC
will fix in promo-D
Comment 3 L Martinek 2004-03-18 09:26:54 UTC
I tried to deploy webmodule outside IDE via tomcat manager and then
deploy other webmodule with the same context path in IDE and it
failed. So Marek is right. Webmodule deployed outside IDE can't be
redeployed inside IDE.
Comment 4 Pavel Buzek 2004-09-09 00:54:53 UTC
Marku and Libore I have to ask what you expect to happen. 

I think that showing an error message in this case is actually the
right thing to do and the only issue is that it should say "Deployment
failed - Context path /balancer is already in use." instead of the
current message "FAIL - Encountered exception
java.io.Exception:java.lang.IllegalStateException:Context path
/balancer is already in use".
Comment 5 zikmund 2004-09-09 08:20:21 UTC
Is it possible to add a hint to that message? (advice the user to
undeploy the web module) + Have associated Help page which could
explain in more details what to do?
Comment 6 Marek Fukala 2004-09-09 08:29:10 UTC
I was just little bit confused by the different behaviour of
deployment on context of a webmodule deployed from and outside of the
IDE. AFAIR for webmodules deployed from the IDE the (re)deployment of
another wm on their context is possible.

Anyway I agree that more user friedly warning message will solve it. I
also like what Karel proposed.
Comment 7 Pavel Buzek 2004-09-10 21:50:44 UTC
*** Issue 40540 has been marked as a duplicate of this issue. ***
Comment 8 Pavel Buzek 2004-09-11 00:54:15 UTC
I removed the first part of message (name of exception class) and
display only the text as I described above so that it looks like a
legal message that informs the user of his error as oposed to IDE failure.

We could of course undeploy the previous module silently but what if
the user did not want it and typed the same context by mistake? We
should not IMO change what tomcat does (and tomcat fails), should we?

To enhance the message with more info would be possible but dificult
(fragile), as this would depend on the actual text of message printed
by Tomcat which can change w/o notice. Also it would need differet
handling in japanees etc. If we do that should we also do it for other
messages? 
I do not see an easy way to connect it to help message. There is not
way to pass help context from tomcat which knows it to the j2eeserver
which displays the dialog - no room for help ctx in the contract.

If you think we should enhance the messages file an enhancement.
Comment 9 Jiri Skrivanek 2004-09-13 18:08:14 UTC
Verified.