Bug 1169239

Summary: Startup fails with 'JBAS014803: Duplicate resource' if "<app>.war.failed" file is present in deployment folder
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Swapnil Chaudhari <schaudha>
Component: ServerAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: high Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.3.0CC: bbaranow, chaowan, jason.greene, jawilson, jmartisk, pslavice, rsvoboda, schaudha
Target Milestone: CR2   
Target Release: EAP 6.4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1207953    

Description Swapnil Chaudhari 2014-12-01 06:20:56 UTC
Description of problem:

If a deployment failed then the file "<app>.war.failed" generated so after fixing the the problem when we restart the EAP, it will fail with below Error because the "<app>.war.failed" file is present in deployment directory :

-----------------------
10:35:03,485 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 18) JBAS014613: Operation ("add") failed - address: ([("deployment" => "Test.war")]) - failure description: "JBAS014803: Duplicate resource [(\"deployment\" => \"Test.war\")]"
10:35:03,487 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "JBAS014784: Failed executing subsystem deployment-scanner boot operations"
10:35:03,493 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
----------------------- 

Version-Release number of selected component (if applicable):


How reproducible:

 - Below are the steps to reproduce the issue :

Steps to Reproduce:

1. deploy a "Test.war"
2. Change something in "Test.war" to fail it.
3. "Test.war.failed" file will be created.
4. stop JBoss EAP.
5. Revert the changes done in "Test.war" so that it will deploy successfully. 
6. Now there are two files ("Test.war.failed" and "Test.war")in deployment directory. 
7. Restart JBoss EAP, it will fail with below Error :

-----------------------
10:35:03,485 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 18) JBAS014613: Operation ("add") failed - address: ([("deployment" => "Test.war")]) - failure description: "JBAS014803: Duplicate resource [(\"deployment\" => \"Test.war\")]"
10:35:03,487 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "JBAS014784: Failed executing subsystem deployment-scanner boot operations"
10:35:03,493 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
----------------------- 

Actual results:


Expected results:


Additional info:

Comment 1 Fernando Nasser 2014-12-01 14:51:25 UTC
"Deploy" but how?  Dropping the file?  Via the CLI?  Via the Console?  From inside Eclipse?  (the last one works for me, many times a day actually)

Also, why stopping the server to fix the deployment?  Does the same happen if the Server is kept on?

All this said, the scanner should ignore/remove the .failed marker file if the timestamp of the .?ar file is newer.

Reassigning to Carlo for proper component selection (this BZ is misfiled).

Comment 6 Rostislav Svoboda 2015-04-23 13:31:43 UTC
qa_acking, qa contact can stay as it is, will be properly assigned when CP01 arrives.

Comment 8 Jan Martiska 2015-05-15 07:54:19 UTC
Verified in EAP 6.4.1.CR2.

Comment 10 Petr Penicka 2017-01-17 10:01:14 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 11 Petr Penicka 2017-01-17 10:01:16 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.