2014-07-15 312 views
1

我想使用JBoss的IRONJACAMAR用以下ironjacamar.xml部署CXF JCA資源適配器:部署CXF資源適配器6.1

<?xml version="1.0" encoding="UTF-8"?> 
<p:ironjacamar xmlns:p="http://www.jboss.org/ironjacamar/schema" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema "> 
    <p:connection-definitions> 
     <p:connection-definition jndi-name="java:/CXFConnector" class-name="org.apache.cxf.jca.outbound.CXFConnectionFactory"> 
      <p:pool> 
       <p:min-pool-size>10</p:min-pool-size> 
       <p:max-pool-size>100</p:max-pool-size> 
      </p:pool> 
      <p:security> 
       <p:application/> 
      </p:security>   
     </p:connection-definition> 
    </p:connection-definitions> 
</p:ironjacamar> 

此XML文件位於CXFResourceAdapter.rar/META-INF,在其內部在我們耳邊。

什麼,我得到的是:

16:27:25,468 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.ra.deployer."OURServer.ear#CXFResourceAdapter": org.jboss.msc.service.StartException in service jboss.ra.deployer."OURServer.ear#CXFResourceAdapter": JBAS010446: Failed to start RA deployment [OURServer.ear#CXFResourceAdapter] 
    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:116) 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55] 
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55] 
Caused by: org.jboss.jca.deployers.common.DeployException: org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl not a valid connection definition 
    at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.findConnectionDefinitions(AbstractResourceAdapterDeployer.java:476) 
    at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1847) 
    at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1104) 
    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:197) 
    at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:112) 
    ... 5 more 

心中已經foud有兩類稱爲CXFConnectionFactory位於包org.apache.cxf.jca.outboundorg.apache.cxf.connector

我們在JBoss 5上使用了org.apache.cxf.connector.CXFConnectionFactory,它工作正常。 我在做什麼錯?

回答

0

所以我找到了解決方案。錯誤在連接定義部分的class-name屬性中。

正確的分類是org.apache.cxf.jca.cxf.AssociatedManagedConnectionFactoryImpl