Bug 1286272

Summary: [GSS](6.4.z) DuplicateService Exception if services are used in multiple modules of an EAR deployment
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: MSCAssignee: Panagiotis Sotiropoulos <psotirop>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.4CC: bbaranow, bmaxwell, david.lloyd, dosoudil, dpospisi, fgavrilo, istudens, jtruhlar, msochure, paul.ferraro, pmackay, ppenicka, psotirop, rhatlapa, rnetuka, vtunka
Target Milestone: CR1   
Target Release: EAP 6.4.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1292044 (view as bug list) Environment:
Last Closed: 2017-01-17 13:00:16 UTC 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: 1292044, 1330911, 1339868    
Attachments:
Description Flags
A simple example based on the quickstarts
none
Uploading the test .ear of wfink
none
Adding the stack trace for wfink's test .ear
none
Test for Wildfly added. none

Description wfink 2015-11-27 17:18:21 UTC
Description of problem:
If one EAR contains more than one module with a META-INF/services/org.jboss.msc.service.ServiceActivator file the services are activated multiple times (as ServiceActivator files are found).

If the file is moved to the ear/META-INF as the only one there is no activation.
If the ear and a jar contain it it will fail with a org.jboss.msc.service.DuplicateServiceException.

Comment 10 Panagiotis Sotiropoulos 2015-12-09 08:19:06 UTC
Created attachment 1103808 [details]
A simple example based on the quickstarts

Comment 11 Panagiotis Sotiropoulos 2015-12-09 08:19:48 UTC
Hello. I think that this PR fixes the issue : https://github.com/jbossas/jboss-eap/pull/2640

Added also another simple test, which is based on the quickstart example.

Comment 15 Panagiotis Sotiropoulos 2015-12-14 13:29:46 UTC
Created attachment 1105573 [details]
Uploading the test .ear of wfink

Comment 16 Panagiotis Sotiropoulos 2015-12-14 13:39:52 UTC
Created attachment 1105574 [details]
Adding the stack trace for wfink's test .ear

Comment 19 Panagiotis Sotiropoulos 2015-12-15 10:57:11 UTC
Created attachment 1105949 [details]
Test for Wildfly added.

Comment 20 Panagiotis Sotiropoulos 2015-12-15 10:59:29 UTC
Executing the above test for wildfly shows that Multiple Triggers of the Service Activator exist also upstream.

Comment 21 Panagiotis Sotiropoulos 2015-12-15 16:43:48 UTC
Resolved by : https://github.com/jbossas/jboss-eap/pull/2640

Comment 22 JBoss JIRA Server 2015-12-16 12:06:56 UTC
Panagiotis Sotiropoulos <psotirop> updated the status of jira JBEAP-2402 to Closed

Comment 23 JBoss JIRA Server 2015-12-17 08:12:06 UTC
Panagiotis Sotiropoulos <psotirop> updated the status of jira JBEAP-2402 to Reopened

Comment 24 JBoss JIRA Server 2015-12-17 08:15:36 UTC
Panagiotis Sotiropoulos <psotirop> updated the status of jira JBEAP-2402 to Resolved

Comment 25 JBoss JIRA Server 2015-12-17 17:44:56 UTC
Panagiotis Sotiropoulos <psotirop> updated the status of jira JBEAP-2402 to Reopened

Comment 26 Mike McCune 2016-03-28 23:23:30 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 28 Panagiotis Sotiropoulos 2016-05-03 10:07:33 UTC
https://github.com/jbossas/jboss-eap/pull/2770

Comment 29 Peter Mackay 2016-05-05 11:56:22 UTC
This is not fixed in EAP 6.4.8.CP.CR2. I tested with the reproducer provided by wfink and the scenario with 3 service jars was still failing.

The fix provided by Panagiotis in https://github.com/jbossas/jboss-eap/pull/2770 seems to fix this.

Comment 30 Panagiotis Sotiropoulos 2016-05-05 12:26:29 UTC
Since there is a fix moving back to POST

Comment 31 Petr Penicka 2016-05-09 13:23:56 UTC
Rescheduling to CP9.

A rouge commit was introduced when trying to fix this in CP8. It should be reverted when applying the fix in CP9.

Comment 37 Peter Mackay 2016-08-29 12:23:17 UTC
Verified with EAP 6.4.10.CP.CR2.

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