Bug 785684

Summary: Consumers of Spring 3.0 and 3.1 BOMs must include WS Coordinator when running on JBoss Enterprise Web Server
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Karel Piwko <kpiwko>
Component: SpringAssignee: Tejas Mehta <tmehta>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Repel <trepel>
Severity: medium Docs Contact:
Priority: high    
Version: 2.0.0.DR07CC: irooskov, kpiwko, mnovotny, myarboro, ppenicka, rruss
Target Milestone: ER1Keywords: Documentation
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The 3.0, 3.1 and 3.2 versions of the Spring JBoss Stack (BOM file) distributed with JBoss Web Framework Kit were previously compatible only with JBoss Enterprise Application Platform. To use them with JBoss Enterprise Web Server, an additional dependency had to be specified. The issue has been fixed in this release and the JBoss Stacks are now compatible with JBoss Enterprise Web Server out of the box.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-14 14:50:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karel Piwko 2012-01-30 10:58:20 UTC
Description of problem:

An application which combines Spring Web Security 3.0+ and Spring Web Service 2.0.3+ will automatically get com.sun.xml.wsit:wsit-rt runtime dependency. However, this dependency tries to register a coordinator for Web Services, which is already registered by application server.


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

Spring WS 2.0.3.RELEASE or WS 2.0.4.RELEASE

How reproducible:

Always.

Steps to Reproduce:
1. Build an application with dependency on spring-ws-security
  
Actual results:

10:13:07,840 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."airline.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."airline.war".PARSE: Failed to process phase PARSE of deployment "airline.war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.CR1-redhat-1.jar:7.1.0.CR1-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA-redhat-1.jar:1.0.1.GA-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA-redhat-1.jar:1.0.1.GA-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_27]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_27]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
Caused by: java.lang.IllegalArgumentException: JBAS015533: Web Service endpoint com.sun.xml.ws.tx.webservice.member.coord.ActivationRequesterPortTypeImpl with URL pattern /Coordinator is already registered. Web service endpoint com.sun.xml.ws.tx.webservice.member.coord.RegistrationRequesterPortTypeImpl is requesting the same URL pattern.
        at org.jboss.as.webservices.metadata.model.AbstractDeployment.addEndpoint(AbstractDeployment.java:60)
        at org.jboss.as.webservices.metadata.model.JAXWSDeployment.addEndpoint(JAXWSDeployment.java:27)
        at org.jboss.as.webservices.deployers.WSIntegrationProcessorJAXWS_POJO.processAnnotation(WSIntegrationProcessorJAXWS_POJO.java:94)
        at org.jboss.as.webservices.deployers.AbstractIntegrationProcessorJAXWS.deploy(AbstractIntegrationProcessorJAXWS.java:87)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.CR1-redhat-1.jar:7.1.0.CR1-redhat-1]
        ... 5 more



Expected results:

Application is deployed correctly.

Additional info:

Solution is probably to exclude in Spring BOMs, because without it it works. However, this decision might be problematic for EWS user once they want to have same BOMs in future.


<dependency>
                <groupId>org.springframework.ws</groupId>
                <artifactId>spring-ws-security</artifactId>
                <version>${spring-ws.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.xml.wsit</groupId>
                        <artifactId>wsit-rt</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

Comment 1 Rebecca Newton 2012-02-28 06:20:30 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
An application that combines Spring Web Security 3.0+ and Spring Web Service 2.0.3+ automatically gets the com.sun.xml:wsit-rt runtime dependency, which tries to register a coordinator for Web Services. Web Services has already been registered by the application server, so a "failed to process phase PARSE of deployment" error is thrown.

Comment 2 Karel Piwko 2012-03-09 13:48:24 UTC
Note that this issue is not experienced when Spring Bill Of Material files distributed in JBoss Web Framework Kit are used. This is a recommended usage.

Comment 3 Marius Bogoevici 2012-04-12 20:32:37 UTC
Agree on technical note. I believe should add a special note on EWS, that com.sun.xml:wsit-rt needs to be added separately if using the JBoss WFK BOMs.

Comment 4 Karel Piwko 2012-04-13 10:22:06 UTC
Marius, that's a very good point. 

I'm even not sure if we need a technical note for EAP now when Spring BOMs already contain exclusion of problematic artifact and thus EWS technical note might be more relevant.

Comment 5 Karel Piwko 2012-06-01 12:47:38 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,6 @@
-An application that combines Spring Web Security 3.0+ and Spring Web Service 2.0.3+ automatically gets the com.sun.xml:wsit-rt runtime dependency, which tries to register a coordinator for Web Services. Web Services has already been registered by the application server, so a "failed to process phase PARSE of deployment" error is thrown.+When using Spring Bill of Materials distributed in JBoss Web Framework Kit together with JBoss Enterprise Web Server, users have to add following dependency to act as a coordinator for Web Services:
+
+<dependency>
+    <groupId>com.sun.xml.wsit</groupId>
+    <artifactId>wsit-rt</artifactId>
+</dependency>

Comment 9 Karel Piwko 2012-06-19 05:59:48 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1,9 @@
-When using Spring Bill of Materials distributed in JBoss Web Framework Kit together with JBoss Enterprise Web Server, users have to add following dependency to act as a coordinator for Web Services:
+When using Spring Bill of Materials (BOM) distributed in JBoss Web Framework Kit together with JBoss Enterprise Web Server, users have to add following dependency to act as a coordinator for Web Services:
 
 <dependency>
     <groupId>com.sun.xml.wsit</groupId>
     <artifactId>wsit-rt</artifactId>
-</dependency>+    <version>1.3.1</version>
+</dependency>
+
+This artifact is available in JBoss Nexus Repository. Please follow instructions in bug #831607 in order to enable the repository.

Comment 13 Marius Bogoevici 2012-11-09 14:18:29 UTC
Fixed in v 2.0.4.Final upstream

Comment 20 Tomas Repel 2013-03-08 10:00:12 UTC
Verified in WFK 2.2.0.ER1. I tested all Spring BOMs on EWS2 and EAP6, the workaround is not needed anymore.

Comment 21 Karel Piwko 2013-03-08 10:53:03 UTC
Retargeting and marking verified.

Comment 22 Karel Piwko 2013-05-14 14:50:34 UTC
Closed as CURRENTRELEASE, part of WFK 2.2.0 distributables.