0 Replies Latest reply on Jun 26, 2012 8:35 AM by Sergiu Pienar

    ResourceAdapter can't inject config-property

    Sergiu Pienar Expert

      Hi,

       

      I have a resource adapter defined in standalone-full.xml like this :

       

      <resource-adapter>

                          <archive>

                             all-dev.ear#MyConnector-ra-impl-0.1.0.rar

                          </archive>

                                                        <config-property name="ConnectorConnectionClass">comConnectorDirectoryConnection</config-property>

                          <transaction-support>NoTransaction</transaction-support>

                          <connection-definitions>

                              <connection-definition class-name="com.ConnectorManagedConnectionFactory" jndi-name="java:jboss/eis/MyConnector" enabled="true" use-java-context="true" pool-name="Connection" use-ccm="true">

                                  <security>

                                      <application/>

                                  </security>

                              </connection-definition>

                          </connection-definitions>

                      </resource-adapter>

       

      Its ra.xml is like :

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <connector xmlns="http://java.sun.com/xml/ns/j2ee"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

                      http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"

              version="1.5">

       

       

          <display-name>ConnectorConnector</display-name>

          <eis-type>Connector System</eis-type>

          <resourceadapter-version>0.1.0</resourceadapter-version>

          <resourceadapter>

              <resourceadapter-class>org.jboss.resource.deployment.DummyResourceAdapter</resourceadapter-class>

              <outbound-resourceadapter>

                  <connection-definition>

                      <managedconnectionfactory-class>com.ConnectorManagedConnectionFactory</managedconnectionfactory-class>

                       <config-property>

                          <config-property-name>ConnectorConnectionClass</config-property-name>

                          <config-property-type>java.lang.String</config-property-type>

      <!--

                                                        Confirure here the correct implementation of the connection class.

      -->                   

                          <config-property-value>com.ConnectorDirectoryConnection</config-property-value>

                      </config-property>

                      <connectionfactory-interface>comConnectorFactory</connectionfactory-interface>

                      <connectionfactory-impl-class>com.ConnectorFactoryImpl</connectionfactory-impl-class>

                      <connection-interface>com.ConnectorConnection</connection-interface>

                      <connection-impl-class>com.ConnectorConnectionImpl</connection-impl-class>

                  </connection-definition>

                  <transaction-support>NoTransaction</transaction-support>

                  <reauthentication-support>false</reauthentication-support>

              </outbound-resourceadapter>

          </resourceadapter>

      </connector>

       

      Upon starting JBoss I get :

       

      12:27:45,144 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-14) MSC00001: Failed to start service jboss.ra.deployment."all-dev.ear#Connector-ra-impl-0.1.0.rar_1": org.jboss.msc.service.StartException in service jboss.ra.deployment."all-dev.ear#Connector-ra-impl-0.1.0.rar_1": org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment all-dev.ear#Connector-ra-impl-0.1.0]

              at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:127)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25-ea]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25-ea]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25-ea]

      Caused by: org.jboss.jca.deployers.common.DeployException: IJ020060: Unable to inject: com.jca.DummyResourceAdapter property: ConnectorConnectionClass value: com.ConnectorDirectoryConnection

              at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1152)

              at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:178)

              at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:104)

              ... 5 more

       

      If I leave out the config-property the adapter deploys fine.

       

      Any help is welcome.


      Thank you.