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 96587 - Make it possible to deploy several webapps simultaneously
Summary: Make it possible to deploy several webapps simultaneously
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 139879 163509 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-26 14:41 UTC by kirillkh
Modified: 2009-06-19 15:53 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 kirillkh 2007-02-26 14:41:19 UTC
I have 2 web projects simultaneously open and configured to use the same Tomcat
instance. But, in all recent NetBeans versions (at least from 5.0 upwards), it
is impossible to deploy both applications to the same server:

1. start the server
2. deploy the first application from its project right-click menu: the
application is brought up
3. deploy the second application from its project right-click menu: the first
application is automatically undeployed and the second is brought up; the
following message appears in console:

Undeploying ...
undeploy?path=/app1
OK - Undeployed application at context path /app1
In-place deployment at C:\projects\app2\nbprj-std\build\web
OK - Deployed application at context path /app2
OK - Started application at context path /app2


If you then try to deploy the first application, same thing happens: the second
application gets undeployed.

Of course, it is possible to configure another Tomcat instance and run the
second application in it, but for obvious reasons running a server instance per
application is inefficient.
Comment 1 Sherold Dev 2007-02-27 09:28:28 UTC
I cannot reproduce this behavior, marking as INCOMPLETE. When I create two new
web projects app1 and app2 and then I deploy them without any modification both
applications are accessible on the server as expected.

Have you modified somehow the standard NetBeans project structure? Can you
please describe exact steps how to reproduce this behavior - what exact
modification have you made in the project configurations, if any?
Comment 2 kirillkh 2007-02-27 10:02:56 UTC
Indeed, I have tried creating 2 new projects and deploying them - it works. And
yes, I have made modifications to the projects structure in order to adapt
NetBeans to the directory layouts of existing projects. I am going to try making
these modifications one-by-one on the new project in order to see, what triggers
the bug.
Comment 3 kirillkh 2007-02-27 16:14:34 UTC
Here's how I managed to reproduce the bug:

1. create the following directory layout somewhere on the disk:
  app3
  |--nbprj
  |--web
     |--java
     |--content
        |--WEB-INF
           |--web.xml

2. in NB, use "New Project" wizard to create a new web project with existing
sources, select app3 as the root, app3/nbprj as the project folder,
app3/web/java as a source dir and app3/web/content as the web content dir
3. repeat the above steps to create a new project named app4
4. try deploying both projects into the same Tomcat instance



To fill web.xml with some valid content before creating the projects, you can
use the following:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
</web-app>
Comment 4 Sherold Dev 2007-02-28 10:55:29 UTC
Thanks for the steps. Removing the INCOMPLETE keyword, since I am now able to
reproduce the issue.

Setting the TM to 6.0.

The problem seems to be that both projects use the same project folder name,
using nbprj1 and nbprj2 seems to workaround the issue.
Comment 5 kirillkh 2007-05-29 22:40:56 UTC
Seems like it's fixed?
Comment 6 Sherold Dev 2007-05-30 09:01:28 UTC
I am not aware of any changes in this area, so unless you cannot reproduce it
anymore the issue is probably still there.
Comment 7 Sherold Dev 2007-08-14 09:11:48 UTC
The issue is still reproducible
Comment 8 blair_nilsson 2008-06-18 01:45:19 UTC
This is a major problem when you are using multi-module maven projects - since by definition they will have the same
project folder name.
Comment 9 Vince Kraemer 2008-12-03 19:32:01 UTC
bad tm value... reset to tbd
Comment 10 Petr Hejl 2009-05-05 14:04:51 UTC
*** Issue 163509 has been marked as a duplicate of this issue. ***
Comment 11 Petr Hejl 2009-05-05 14:07:41 UTC
This seems to be caused by DeploymentTargetImpl.getTargetModuleFilename() logic.
Comment 12 Petr Hejl 2009-05-05 15:19:52 UTC
Perhaps introduced by this http://hg.netbeans.org/main/rev/15966.
Comment 13 Petr Hejl 2009-05-05 19:57:21 UTC
Fixed in web-main e0ffaafc7d90.
Comment 14 Quality Engineering 2009-05-07 08:12:51 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e0ffaafc7d90
User: phejl@netbeans.org
Log: #96587 Make it possible to deploy several webapps simultaneously
Comment 15 Petr Hejl 2009-06-19 15:53:46 UTC
*** Issue 139879 has been marked as a duplicate of this issue. ***