3 Replies Latest reply on Dec 21, 2001 8:14 PM by antonyhirst

    how to deploy a resource adapter ?

    phillipchengyi

      I followed the sun CA-1.0 spec and wrote a resource adapter, succesfully used that on weblogic, sun-ri-1.3.
      now i tried to deploy that on jboss.

      1) i copy the independent bep.rar file under deploy dir.

      2) i followed the instructions on the doc, create a bep-service.xml under deploy dir.
      it is copied below:
      <?xml version="1.0" encoding="UTF-8"?>


      cfgpath=d:/project/platform/dist/bmwf/config
      braveminds.wfms.DataSource
      java:/TransactionManager
      <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=bep</mbean-ref>
      <mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>
      #
      BlockingTimeoutMillis=500000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=30
      MinSize=0
      MaxIdleTimeoutPercent=1.0

      org.jboss.resource.security.ManyToOnePrincipalMapping
      UserName=""



      3) i copy the needed jars under lib/ext
      then i started jboss
      I got the following exception:
      16:59:44,973 ERROR [DataSource] Failed
      javax.management.RuntimeOperationsException: Object name cannot be null
      at com.sun.management.jmx.MBeanServerImpl.isRegistered(MBeanServerImpl.j
      ava:1096)
      at org.jboss.resource.ConnectionFactoryLoader.startService(ConnectionFac
      toryLoader.java:424)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      30)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:757)
      at $Proxy0.start(Unknown Source)

      4) i changed the ResourceAdapterName from mbean-ref to attribute
      I got the following exception:
      17:01:28,053 ERROR [ServiceController] Could not configure MBean: JBOSS-SYSTEM:s
      ervice=ConnectionFactoryLoader,name=bep
      java.lang.NullPointerException
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.ja
      va:245)
      at org.jboss.system.ServiceController.install(ServiceController.java:200
      )
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.deployment.ServiceDeployer.invoke(ServiceDeployer.java:734)

      at org.jboss.deployment.ServiceDeployer.deploy(ServiceDeployer.java:232)

      at org.jboss.deployment.DeployerMBeanSupport.deploy(DeployerMBeanSupport
      .java:97)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:683)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:326)
      at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:516)

      5)I noticed at the end of the loginfo there is such a sentence:
      17:01:34,832 WARN [ServiceController] JCA:service=RARDeployment,name=bep does n
      ot implement any Service methods

      thank you.

        • 1. Re: how to deploy a resource adapter ?
          antonyhirst

          ^bump^

          I'm having the same trouble (getting the same error message trying to get an Oracle 8.17 JDBC thin local transaction data source installed. This is with version 3.0 beta.

          I create test-server.xml and install it in the ./deploy dir containing the follow mbean definition:



          ConnectionURL=jdbc:oracle:thin:@ahirstlapw2k:1521:AHIRST
          DriverClass=oracle.jdbc.driver.OracleDriver
          UserName=XalertsEJB
          Password=password

          XalertsEJB
          java:/TransactionManager
          <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter</mbean-ref>
          <mbean-ref name="ConnectionManagerFactoryLoaderName">JCA:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</mbean-ref>

          BlockingTimeoutMillis=50000
          IdleTimeoutMinutes=30
          MaxSize=10
          CleanupIntervalMinutes=10
          MinSize=0
          MaxIdleTimeoutPercent=1.0


          org.jboss.resource.security.ManyToOnePrincipalMapping


          userName=XalertsEJB
          password=password



          I then get the following error:

          14:32:33,634 ERROR [XalertsEJB] Failed
          javax.management.RuntimeOperationsException: Object name cannot be null
          at com.sun.management.jmx.MBeanServerImpl.isRegistered(MBeanServerImpl.j
          ava:1096)
          at org.jboss.resource.ConnectionFactoryLoader.startService(ConnectionFac
          toryLoader.java:424)
          at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
          30)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
          28)
          at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
          23)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
          ler.java:757)
          at $Proxy0.start(Unknown Source)
          at org.jboss.system.ServiceController.start(ServiceController.java:332)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
          28)...

          All suggestions appreciated.

          Cheers,

          Tony.

          • 2. Re: how to deploy a resource adapter ?
            davidjencks

            Ok, Now I know what to do this morning ;-).

            The examples in the manual need to be updated for the cvs version of jboss. Change "mbean-ref name=" to "depends optional-attribute-name=" and similarly for the end tags.

            • 3. Re: how to deploy a resource adapter ?
              antonyhirst

              Thanks mate! That has sorted my Oracle (pronounced "Horrorcle") conection out.