Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 899884 (JBPAPP6-421)

Summary: JCA 1.5 is not supported within RAR deployments - broken compatibility
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Karel Piwko <kpiwko>
Component: JCAAssignee: Karel Piwko <kpiwko>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: jpederse, no-reply
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-421
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-22 15:40:50 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:
Attachments:
Description Flags
spring-jmx-rar.rar none

Description Karel Piwko 2012-02-22 17:39:14 UTC
project_key: JBPAPP6

Deployment of JCA 1.5 RAR archives is not supported.

Archive content is check for JCA 1.6 implementation and thus fails.

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]

However, spec JCA 1.5 requires ResourceAdaptor to fulfill Java Bean contract, not to implement equals() or hashCode().

Comment 1 RH Bugzilla Integration 2012-02-22 17:40:05 UTC
Bugzilla Update: Added: Perform


Comment 2 RH Bugzilla Integration 2012-02-22 17:40:06 UTC
Bugzilla References: Added: https://bugzilla.redhat.com/show_bug.cgi?id=796313


Comment 3 Karel Piwko 2012-02-22 17:40:37 UTC
Attaching a test case.

Comment 4 Karel Piwko 2012-02-22 17:40:37 UTC
Attachment: Added: spring-jmx-rar.rar


Comment 5 Jesper Pedersen 2012-02-22 17:44:58 UTC
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 6 RH Bugzilla Integration 2012-02-24 09:13:28 UTC
Karel Piwko <kpiwko> changed the Status of [bug 796313|https://bugzilla.redhat.com/show_bug.cgi?id=796313] from NEW to VERIFIED

Comment 7 RH Bugzilla Integration 2012-02-24 09:13:29 UTC
JBoss JIRA Server <jira-update> made a comment on [bug 796313|https://bugzilla.redhat.com/show_bug.cgi?id=796313]

Karel Piwko <kpiwko> made a comment on jira JBPAPP-8200

Attaching a test case.

Comment 8 RH Bugzilla Integration 2012-02-24 09:13:31 UTC
JBoss JIRA Server <jira-update> made a comment on [bug 796313|https://bugzilla.redhat.com/show_bug.cgi?id=796313]

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 9 RH Bugzilla Integration 2012-02-24 09:13:32 UTC
Karel Piwko <kpiwko> made a comment on [bug 796313|https://bugzilla.redhat.com/show_bug.cgi?id=796313]


    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 10 Karel Piwko 2012-02-24 09:15:48 UTC
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 11 Anne-Louise Tangring 2012-11-05 13:49:26 UTC
Docs QE Status: Removed: NEW