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 116482 - duplicate web entry in application.xml and deploy error
Summary: duplicate web entry in application.xml and deploy error
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-24 10:21 UTC by nouar38
Modified: 2009-12-21 06:19 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 nouar38 2007-09-24 10:21:53 UTC
NB 6.0 200709200000 & GF v2 b58g & jdk 1.6u1

may be against j2ee but could not find the suitable subcomp.

negative test:
--------------
http://appserver-sqe.red.iplanet.com/twiki/pub/SQEAdmin90/NetBeanComponent/netbean_plugin_deploy_testspec_5.5.html

4) Include a duplicate entry for a module in application.xml descriptor 
   of an otherwise valid application archive. Deploy. Check error messages 
   for validity, and usefulness

Tried over an EAR Java EE 5 with web module, added standard descriptor to the EAR, and copy-paste the same web entry in
the editor.

Got the expected exception from IDE:
<<
SEVERE [global]

org.netbeans.modules.schema2beans.Schema2BeansException: Property "web" already bound to a DOM node.
	at org.netbeans.modules.schema2beans.BeanProp.registerDomNode(BeanProp.java:1799)
...
>>>

build & deploy =>>> Deployment failed as expected.

ENH:
Would be nice if can have in the deployment error the second reason for the failure 
<< Duplicate unique value [/EnterpriseApplication6-war] declared for identity constraint of element "application". [11]>>
as given by the XML validation output.

<<
XML validation started.

Checking file:/NetBeansProjects/EnterpriseApplication7/src/conf/application.xml...
cvc-complex-type.2.4.a: Invalid content was found starting with element 'web'. One of
'{"http://java.sun.com/xml/ns/javaee":alt-dd}' is expected. [9] 
Duplicate unique value [/EnterpriseApplication6-war] declared for identity constraint of element "application". [11] 
XML validation finished.
>>

server.log:

<<
"DPL8015: Invalid Deployment Descriptors in Deployment descriptor file META-INF/application.xml in archive [gfdeploy]. 
Line 9 Column 10 -- cvc-complex-type.2.4.a: Invalid content was found starting with element 'web'. One of
'{"http://java.sun.com/xml/ns/javaee":alt-dd}' is expected."
"DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.a: Invalid content was found starting with
element 'web'. One of '{"http://java.sun.com/xml/ns/javaee":alt-dd}' is expected."
Exception occured in J2EEC Phase
... etc.
>>
Comment 1 nouar38 2007-09-24 10:40:52 UTC
for a J2EE 1.4 ear if we add a duplicate web entry:
XML validate output:
<<
XML validation started.

Checking file:/NetBeansProjects14/EnterpriseApplication8/src/conf/application.xml...
Duplicate unique value [/EnterpriseApplication8-war] declared for identity constraint of element "application". [13] 
XML validation finished.
>>>

as well in the server.log at deploy will have this failure message.
<<
Deploying application in domain failed; Deployment descriptor file META-INF/application.xml in archive [gfdeploy]. 
Duplicate unique value [/EnterpriseApplication8-war] declared for identity constraint of element "application".
Deployment error:
... etc.
>>
Comment 2 Vince Kraemer 2008-04-26 04:03:51 UTC
This needs to be investigated and cleaned up...  I don't see how an exception from the iDE is "expected"...
Comment 3 Vince Kraemer 2008-07-28 18:41:13 UTC
the user has to "work" to get the exception... by altering the application.xml file by hand. lower to p4.

This also needs to move to the ear project for further evaluation.
Comment 4 Quality Engineering 2009-12-21 06:19:31 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team