1 Reply Latest reply on Jan 11, 2006 7:44 PM by Jesse Jackson

    Simple ResourceAdapter and exception

    Jamie Curmi Newbie

      Hi Guys,

      I've very new to JBoss, and to J2EE. What I'm trying to do is build a very simple ResourceAdapter. I've done this, and run it, and it works fine - but I get an exception in JBoss. Hopefully someone can point out what to do here?

      Basically I have a class MyResourceAdapter that extends ResouceAdapter. It has the expected methods (most do nothing), with some print statements in the start and stop methods. Nothing more complicated than this.

      I build the rar file (myrar.rar). It has a ra.xml that has something like:

      ...
      <vendor-name>Me</vendor-name>
      <eis-type>MyProduct</eis-type>
      <resourceadapter-version>1.0</resourceadapter-version>

      <resourceadapter-class>mypackage.MyResourceAdapter</resourceadapter-class>
      ...

      I deploy it with a myrar-ds.xml that looks like:

      ...
      <connection-factories>
      <tx-connection-factory>
      <jndi-name>myproduct</jndi-name>
      <rar-name>myrar.rar</rar-name>
      </tx-connection-factory>
      </connection-factories>
      ...

      It runs fine, but gives an exception:

      11:53:50,308 WARN [ServiceController] Problem starting service jboss.jca:name=jara,service=ManagedConnectionFactory
      org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment! jboss.jca:name='jara.rar',service=RARDeployment; - nested throwable: (org.jboss.deployment.DeploymentException: ConnectionDefinition 'null' not found in rar 'jara.rar')
      at org.jboss.resource.connectionmanager.RARDeployment.startService(RARDeployment.java:544)
      ...

      Now, I've tried adding:

      <connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>

      to the -ds.xml file, which gives a different exception because there is no ConnectionFactory in my rar of course.

      Does this mean I have to create one, even though I don't need one right now? I did experiment trying to create one and add it to my rar, and update the ra.xml to include <connectionfactory-interface> and <connectionfactory-impl-class>, but I still seemed to get an exception that it couldn't find ConnectionFactory.

      Any ideas? At this point I just wanted to make the simplest ResourceAdapter out there, and have it work in JBoss.

      Thanks for any help.

        • 1. Re: Simple ResourceAdapter and exception
          Jesse Jackson Newbie

          Hi there,

          I'm a student starting a J2EE project using JBoss as the application server and have received the exact same error when starting up the server with my deployed ResourceAdapter.

          There is another forum (link to forum) I've seen that talks about this to which the latest suggestions is to add a <connection-definition> tag in the '-ds.xml' as you said, but this doesn't work for me either.

          What on earth is going on here, can anyone shed some light?!

          Thanks,
          Jesse.