Geronimo
  1. Geronimo
  2. GERONIMO-4218

NullPointerException in ConnectorModuleBuilder

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.3, 2.2
    • Component/s: deployment
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      I tried to deploy IMS TM Resource Adapter V10.2.0 runtime (which is downloadable from http://www-306.ibm.com/software/data/ims/ims/components/tm-resource-adapter.html#downloads)
      in Geronimo 2.1.1.

      There is NullPointerException at ConnectorModuleBuilder.java:522 (stacktrace see below)

      The Connector module runs fine with Glassfish 2.1 and JBoss 5.

      The geronimo-ra.xml was included in ims1020.rar\META-INF

      If there is a problem in geronimo-ra.xml, there should at least be a decent error message instead of NPE.

      geronimo-ra.xml:

      <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
      <resourceadapter>
      <outbound-resourceadapter>
      <connection-definition>
      <connectionfactory-interface>com.ibm.connector2.ims.ico.IMSManagedConnectionFactory</connectionfactory-interface>
      </connection-definition>
      </outbound-resourceadapter>
      </resourceadapter>
      </connector>

      Caused by: java.lang.NullPointerException
      at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.addConnectorGBeans(ConnectorModuleBuilder.java:522)
      at org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.initContext(ConnectorModuleBuilder.java:499)
      at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
      at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)

        Activity

        Hide
        Jarek Gawor added a comment -

        Try with the following geronimo-ra.xml:

        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
        
          <resourceadapter>
            <resourceadapter-instance>
              <resourceadapter-name>IMS</resourceadapter-name>
                <nam:workmanager>
                  <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
                </nam:workmanager>
              </resourceadapter-instance>
        
            <outbound-resourceadapter>
              <connection-definition>
                <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
              </connection-definition>
            </outbound-resourceadapter>
          </resourceadapter>
        
        </connector>
        
        Show
        Jarek Gawor added a comment - Try with the following geronimo-ra.xml: <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"> <resourceadapter> <resourceadapter-instance> <resourceadapter-name>IMS</resourceadapter-name> <nam:workmanager> <nam:gbean-link>DefaultWorkManager</nam:gbean-link> </nam:workmanager> </resourceadapter-instance> <outbound-resourceadapter> <connection-definition> <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface> </connection-definition> </outbound-resourceadapter> </resourceadapter> </connector>
        Hide
        Jarek Gawor added a comment -

        There is a easy work-around for the NPE so I'm decreasing the priority of the bug.

        Show
        Jarek Gawor added a comment - There is a easy work-around for the NPE so I'm decreasing the priority of the bug.
        Hide
        Jarek Gawor added a comment -

        Committed changes to trunk (revision 681268) and branches/2.1 (revision 681269) to handle geronimo-ra.xml without resourceadapter-instance element. If the Geronimo plan does not have the resourceadapter-instance element, a gbean for the resourceadapter-instance will be created using the defaults (e.g. the default work manager).

        Show
        Jarek Gawor added a comment - Committed changes to trunk (revision 681268) and branches/2.1 (revision 681269) to handle geronimo-ra.xml without resourceadapter-instance element. If the Geronimo plan does not have the resourceadapter-instance element, a gbean for the resourceadapter-instance will be created using the defaults (e.g. the default work manager).

          People

          • Assignee:
            Jarek Gawor
            Reporter:
            Jürgen Weber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development