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 81234 - Bad handling of name conflicts when deploying Enterprise Application
Summary: Bad handling of name conflicts when deploying Enterprise Application
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-27 09:58 UTC by Tomasz Slota
Modified: 2006-08-31 00:58 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 Tomasz Slota 2006-07-27 09:58:13 UTC
Steps to reproduce:

- create new enterprise project, deploy it

- create another enterprise project with the same name (in different directory), try to deploy it

- deployment fails with a message:

pre-run-deploy:
/Users/tomslot/SUN/test_projects/NameSharing/2/EnterpriseApplication1/nbproject/build-impl.xml:
151: Deployment error:
null
See the server log for details.
BUILD FAILED (total time: 3 seconds)

Server log doesn't contain any details.

In the ideal situation the user should be warned that a module of the same name is already deployed to 
the app server and asked whether it should be overridden.

I think following two scenarios are also acceptable:

- existing module is silently overridden

- deployment fails, but there is a meaningful error message informing about the name conflict and 
possible resolutions

The behavior should be consistent in case of choosing *to run* and *to deploy* the project, which 
doesn't seem to happen now (existing module is silently overridden when app is being run).
Comment 1 Vince Kraemer 2006-07-29 20:43:21 UTC
Need more details. Like platform and glassfish build.

I cannot duplicate the described behavior on Linux.
Comment 2 Tomasz Slota 2006-08-02 08:27:00 UTC
I was using GF build 48 on OS X. The problem was originally observed on Enterprise Samples, I was also 
able to reproduce it on new enterprise applications. Try restarting IDE/GF between deployments. Make 
sure you "deploy" rather than "run". If you still cannot reproduce it what is the behavior you get?
Comment 3 Vince Kraemer 2006-08-31 00:58:22 UTC
I am testing this with GF V1U1B5.

The only way that I have been able to come close to duplicating your results has
been to do the following:

1. create an ent app with a war file in it.

2. deploy the ent app

3. deploy the war file "separately".

In this case I see the following:

dist:
In-place deployment at
/tmp/EnterpriseApplication6/EnterpriseApplication6-war/build/web
Start registering the project's server resources
Finished registering server resources
moduleID=EnterpriseApplication6-war
deployment started : 0%
deployment finished : 100%
Deploying application in domain completed successfully
Rollback completed successfully
Trying to create reference for application in target server  failed; The context
root [EnterpriseApplication6-war] in application [EnterpriseApplication6-war] is
already in use by another application on this instance [server].
/tmp/EnterpriseApplication6/EnterpriseApplication6-war/nbproject/build-impl.xml:430:
Deployment error:
The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)

This looks like what you are asking for.... and is way better than the results
you included in this report.

Do you have more info about the Enterprise Sample app that you were using when
you saw this?

Closing as WORKSFORME pending more info.

Filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=1048 for message
improvements.