问题
we are migrating our application from JBoss 5 to JBoss 6 and there is one thing I can't figure out.
We are using Apache CXF-JCA resource adapter (CXF-JCA home page). They say it is implementig JCA 1.5 specs and that seems to be a problem. Because JBoss is implementing JCA specs version 1.6 CXF's deployment fails because of following:
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.apache.cxf.jca.cxf.ResourceAdapterImpl
Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: org.apache.cxf.jca.cxf.ResourceAdapterImpl
We are using the latest version of CXF-JCA (that is 3.0.0 at this moment). What is best way how to solve it ?
UPDATE: I have found that JBoss actually is supporting JCA 1.5 so the problem is that CXF's implementation is violating some specificition and JBoss 6 is more strict in validation. So there is a workaround: disable validation in JCA Subsystem in Jboss configuration like this:
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="false" />
</subsystem>
回答1:
So I found there is one solution as I mentioned when editing my question and that is disabling (or just setting to not fail on error) archive validation in JBoss with following setting:
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="false" />
</subsystem>
From what I discovered It is caused by missing piece of implementation JCA specs on CXF site. And together with more strict validation in newer JBoss version is causing this troubles.
See comments bellow this JBoss bug report for more informations.
来源:https://stackoverflow.com/questions/24749102/cxf-jca-connector-in-jboss-7-1-or-6-1-not-supported