Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-265

NPE while deploying resource adapter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-M2
    • 1.0-M3
    • connector
    • None
    • fedora core 2
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)

    Description

      i'm trying to deploy a resource adapter with an outbound connector and get a null pointer exception. My connector doesn't support transactions so i've got

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

      in ra.xml and

      <no-transaction/>

      in the connectionmanager element of geronimo-ra.xml. The rar deploys fine but when I try to start it I get a NPE at org.apache.geronimo.connector.outbound.ConnectionManagerFactory$ReturnableXAResource.getName(ConnectionManagerFactory.java:59) because XAResource is null.

      I hacked ConnectionManagerFactory to throw if given a null XAResource in its constructor (since it will throw later anyway) and got

      Caused by: java.lang.NullPointerException: can't supply null XAResource.
      at org.apache.geronimo.connector.outbound.ConnectionManagerFactory$ReturnableXAResource.<init>(ConnectionManagerFactory.java:50)
      at org.apache.geronimo.connector.outbound.AbstractConnectionManager.getRecoveryXAResource(AbstractConnectionManager.java:102)
      at org.apache.geronimo.connector.outbound.AbstractConnectionManager$$FastClassByCGLIB$$80012030.invoke(<generated>)

      The code in AbstractConnectionManager.getRecoveryXAResource() seems suspect since it's instantiating ManagedConnectionInfo() and a few lines later calling its getXAResource() method, but setXAResource() has never been set and ManagedConnectionInfo doesn't set it in the constructor.

      On the other hand, I'm not sure why we're trying to get an XAResource when the deployment descriptors specify no transactions.

      Attachments

        Issue Links

          Activity

            People

              djencks David Jencks
              toby Tobias Schlitt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: