Bug 796313

Summary: Spring ResourceAdapters are not JCA 1.5 and JCA 1.6 compliant
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tomas Repel <trepel>
Component: SpringAssignee: Petr Penicka <ppenicka>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Repel <trepel>
Severity: high Docs Contact:
Priority: high    
Version: 2.0.0.DR08CC: kpiwko, maschmid, mnovotny, myarboro, ppenicka, rruss
Target Milestone: GA   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The SpringContextResourceAdaptor present in Spring versions tested with JBoss Web Framework Kit 2.1.0 violated section 5.3.1 of the JCA 1.5 specification, and did not fully implement JCA 1.5 and 1.6. Consequenly, deployment of RAR archives containing packaged Spring files failed on JBoss Enterprise Application Platform. The issue has been fixed in Spring 3.1.4.RELEASE and Spring 3.2.1.RELEASE, but Spring 3.0.7.RELEASE and Spring 2.5.6.SEC03 are still affected. Description of a workaround that allows successful use of the affected versions has been included in Spring Installation Guide.
Story Points: ---
Clone Of: Environment:
WFK 2.0.0.DR09 EAP 6.0.0.ER1 Spring 3.1.1.RELEASE Spring 3.0.7.RELEASE Spring 2.5.6.SEC03
Last Closed: 2013-06-27 13:36:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The spring-jmx-rar.rar that cannot be deployed none

Description Tomas Repel 2012-02-22 16:56:14 UTC
Description of problem:

After building the Spring JMX RAR example, the spring-jmx-rar.rar cannot be deployed. It works using EAP6 6.0.0.DR13.

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

How reproducible:

Always

Steps to Reproduce:
1. build spring-jmx-rar.rar
2. deploy spring-jmx-rar.rar on EAP
  
Actual results:

17:06:15,395 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "spring-jmx-rar.rar"
17:06:16,075 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.ra.deployer.spring-jmx-rar: org.jboss.msc.service.StartException in service jboss.ra.deployer.spring-jmx-rar: JBAS010446: Failed to start RA deployment [spring-jmx-rar]
	at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:103)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_22]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_22]
	at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/home/trepel/sources/wfk-qa/build/configuration/../../../jboss-eap-6.0/standalone/tmp/vfs/temp8ccd62028aaee21d/content-e4ed920691b864aa/contents/
	at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2167)
	at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1030)
	at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:172)
	at org.jboss.as.connector.metadata.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:101)
	... 5 more
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: org.springframework.jca.context.SpringContextResourceAdapter

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: org.springframework.jca.context.SpringContextResourceAdapter

	... 9 more

17:06:16,108 INFO  [org.jboss.as.server] (management-handler-threads - 2) JBAS015870: Deploy of deployment "spring-jmx-rar.rar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.ra.deployer.spring-jmx-rar" => "org.jboss.msc.service.StartException in service jboss.ra.deployer.spring-jmx-rar: JBAS010446: Failed to start RA deployment [spring-jmx-rar]"}}
17:06:16,110 INFO  [org.jboss.as.controller] (management-handler-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.ra.deployer.spring-jmx-rar: org.jboss.msc.service.StartException in service jboss.ra.deployer.spring-jmx-rar: JBAS010446: Failed to start RA deployment [spring-jmx-rar]


Expected results:

It passes.

Additional info:

Comment 1 Tomas Repel 2012-02-22 16:58:16 UTC
Created attachment 565041 [details]
The spring-jmx-rar.rar that cannot be deployed

Comment 2 Tomas Repel 2012-02-22 16:59:40 UTC
I added the spring-jmx-rar.rar as an attachment.

Comment 3 Karel Piwko 2012-02-22 17:31:42 UTC
This bug is likely caused by IronJacamar enforcing JCA 1.6, whereas Spring JMX RAR uses JCA 1.5, where this is not required.

Comment 4 Karel Piwko 2012-02-22 17:32:15 UTC
This bug is likely caused by IronJacamar enforcing JCA 1.6, whereas Spring JMX RAR uses JCA 1.5, where this is not required.

Comment 5 JBoss JIRA Server 2012-02-22 17:40:39 UTC
Karel Piwko <kpiwko> made a comment on jira JBPAPP-8200

Attaching a test case.

Comment 6 JBoss JIRA Server 2012-02-22 17:44:59 UTC
Jesper Pedersen <jpederse> made a comment on jira JBPAPP-8200

JCA 1.5: 5.3.1 - "The application server is allowed to have multiple instances of a ResourceAdapter
JavaBean active simultaneously, in the same JVM, provided the instances are not
equal. Their equality is determined using the equals method, and therefore, the
ResourceAdapter JavaBean is required to implement the equals method."

You can disable validation with <archive-validation> in the JCA subsystem.

Comment 7 Karel Piwko 2012-02-24 09:13:26 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:
SpringContextResourceAdapter present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE and Spring 3.1.0.RELEASE does not fully implement JCA 1.5 (and JCA 1.6) contact.

To be more precise, it violates section 5.3.1 of JCA 1.5 specification: "The application server is allowed to have multiple instances of a ResourceAdapter JavaBean active simultaneously, in the same JVM, provided the instances are not equal. Their equality is determined using the equals method, and therefore, the ResourceAdapter JavaBean is required to implement the equals method."

To workaround this problem, disable archive validation within JCA subsystem via following configuration:

        <subsystem xmlns="urn:jboss:domain:jca:1.1">
            <archive-validation enabled="false" />
        </subsystem>

Comment 8 JBoss JIRA Server 2012-02-24 09:15:50 UTC
Karel Piwko <kpiwko> updated the status of jira JBPAPP-8200 to Closed

Comment 9 JBoss JIRA Server 2012-02-24 09:15:50 UTC
Karel Piwko <kpiwko> made a comment on jira JBPAPP-8200

This issue is not JCA 1.5 specification violation by JCA component of EAP, it is rather a bug in Spring implementation of ResourceAdapter.

EAP 6 is more strict on enforcing the contract. Rejected, will be documented in WFK2.

Comment 10 Karel Piwko 2012-02-24 09:28:00 UTC
Filed a bug upstream https://jira.springsource.org/browse/SPR-9162

Comment 11 Rebecca Newton 2012-03-08 03:47:12 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,8 +1,6 @@
-SpringContextResourceAdapter present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE and Spring 3.1.0.RELEASE does not fully implement JCA 1.5 (and JCA 1.6) contact.
+The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. 
 
-To be more precise, it violates section 5.3.1 of JCA 1.5 specification: "The application server is allowed to have multiple instances of a ResourceAdapter JavaBean active simultaneously, in the same JVM, provided the instances are not equal. Their equality is determined using the equals method, and therefore, the ResourceAdapter JavaBean is required to implement the equals method."
-
-To workaround this problem, disable archive validation within JCA subsystem via following configuration:
+The workaround for this problem is so disable archive validation within the JCA subsystem. Use this configuration to do so:
 
         <subsystem xmlns="urn:jboss:domain:jca:1.1">
             <archive-validation enabled="false" />

Comment 12 JBoss JIRA Server 2012-03-22 15:40:37 UTC
Paul Gier <pgier> updated the status of jira JBPAPP-8200 to Reopened

Comment 13 JBoss JIRA Server 2012-03-22 15:40:52 UTC
Paul Gier <pgier> updated the status of jira JBPAPP-8200 to Closed

Comment 15 Rebecca Newton 2012-06-19 05:46:59 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,7 +1 @@
-The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. 
+The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. This issue has been fixed with JBoss Web Framework Kit 2 and the problem no longer presents.-
-The workaround for this problem is so disable archive validation within the JCA subsystem. Use this configuration to do so:
-
-        <subsystem xmlns="urn:jboss:domain:jca:1.1">
-            <archive-validation enabled="false" />
-        </subsystem>

Comment 17 Karel Piwko 2012-06-19 06:06:59 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,8 @@
-The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. This issue has been fixed with JBoss Web Framework Kit 2 and the problem no longer presents.+The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. 
+ 
+The workaround for this problem is so disable archive validation within the JCA subsystem. Use this configuration to do so:
+ 
+         <subsystem xmlns="urn:jboss:domain:jca:1.1">
+             <archive-validation enabled="false" />
+
+See https://jira.springsource.org/browse/SPR-9162 for more details.

Comment 20 Karel Piwko 2012-06-21 14:26: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,4 +1,4 @@
-The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.0.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. 
+The SpringContextResourceAdaptor present in Spring 2.5.6.SEC03, Spring 3.0.7.RELEASE, and Spring 3.1.1.RELEASE violates section 5.3.1 of the JCA 1.5 specification, and does not fully implement JCA 1.5 and 1.6 contact. 
  
 The workaround for this problem is so disable archive validation within the JCA subsystem. Use this configuration to do so:

Comment 21 Petr Penicka 2013-02-08 16:50:06 UTC
Karel, are we still keeping this in the Know Issues in WFK 2.2 docs?

Comment 22 Karel Piwko 2013-02-11 13:52:03 UTC
Petr, this issue is still valid, although the versions will differ. I think that it would be better to merge it to Spring documentation instead.

Comment 23 Petr Penicka 2013-02-13 09:26:53 UTC
Lauren: this is one of the issues I mentioned in today's meeting. Please remove the item from known issues in the Release notes and add it to a suitable location in the Spring Developer Guide.

Comment 24 Petr Penicka 2013-03-05 21:09:10 UTC
Known issue removed from Release Notes:

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html/Release_Notes_2.2.0/Known_Issues_with_this_release.html

Build: JBoss_Web_Framework_Kit-Release_Notes_2.2.0-2.2-en-US-0-3


Info added in a warning box into Spring Installation Guide:

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html/Spring_Installation_Guide/Inside_Applications.html

Build: JBoss_Web_Framework_Kit-Spring_Installation_Guide-2.2-en-US-2.2.0-2

Comment 25 Tomas Repel 2013-03-12 09:37:25 UTC
Hi, I have just verified that this issue is now fixed for Spring 3.1.4.RELEASE and 3.2.1.RELEASE. From WFK 2.2.0 perspective, the warning you have added is relevant only for Spring 3.0.7.RELEASE and 2.5.6.SEC03, it should be mentioned there.

Comment 26 Petr Penicka 2013-03-13 16:35:45 UTC
Thanks for verifying this, fixed book is now available on the docs stage.

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html/Spring_Installation_Guide/Inside_Applications.html

Build: JBoss_Web_Framework_Kit-Spring_Installation_Guide-2.2-en-US-2.2.0-4

Comment 27 Tomas Repel 2013-03-15 08:14:39 UTC
The comment 26 has been verified.

Comment 29 Karel Piwko 2013-04-18 10:04:21 UTC
My opinion is that this issue should be present in fixed issues.

Comment 30 Petr Penicka 2013-04-18 20:18:27 UTC
Edited doc text to reflect the current situation and included it among fixed issues in the RN book.

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html-single/2.2.0_Release_Notes/index.html

Build: JBoss_Web_Framework_Kit-2.2.0_Release_Notes-2.2-en-US-0-24