glassfish
  1. glassfish
  2. GLASSFISH-12327

do not process RARs that are not enabled in an instance

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b12
    • Component/s: jca
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,327

      Description

      During a remote instance startup, "connector-resource" recovery handler tries to
      load the connector-descriptor of a RAR that is referred by the connection-pool
      of the connector-resource.
      Currently there is no check for whether the resource-adapter (application-ref) is
      available in the instance in which the recovery is done.

      Following exception is seen :

      [#|2010-06-22T08:54:28.725+0530|SEVERE|glassfish3.1|javax.enterprise.resource.jta.com.sun.enterprise.transaction|_ThreadID=15;_ThreadName=Thread-1;|DTX5016:Error
      in XA recovery. See logs for more details
      java.lang.NullPointerException
      at
      com.sun.enterprise.resource.recovery.ConnectorsRecoveryResourceHandler.getTransactionSupport(ConnectorsRecoveryResourceHandler.java:304)
      at
      com.sun.enterprise.resource.recovery.ConnectorsRecoveryResourceHandler.loadXAResourcesAndItsConnections(ConnectorsRecoveryResourceHandler.java:189)
      at
      com.sun.enterprise.transaction.jts.ResourceRecoveryManagerImpl.getAllRecoverableResources(ResourceRecoveryManagerImpl.java:173)
      at
      com.sun.enterprise.transaction.jts.ResourceRecoveryManagerImpl.recoverXAResources(ResourceRecoveryManagerImpl.java:203)
      at
      com.sun.enterprise.transaction.jts.ResourceRecoveryManagerImpl.recoverXAResources(ResourceRecoveryManagerImpl.java:266)
      at
      com.sun.enterprise.transaction.jts.ResourceRecoveryManagerImpl.postConstruct(ResourceRecoveryManagerImpl.java:94)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at
      com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at
      com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at org.jvnet.hk2.component.Habitat.getByContract(Habitat.java:983)
      at
      com.sun.enterprise.transaction.startup.TransactionRecoveryWrapper.postConstruct(TransactionRecoveryWrapper.java:70)
      at com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
      at com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:87)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:84)
      at com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
      at
      com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
      at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
      at
      com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
      at
      com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:313)
      at
      com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:128)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:458)
      at com.sun.enterprise.module.bootstrap.Main.launch(Main.java:402)
      at
      org.jvnet.hk2.osgiadapter.HK2Main$StartupContextService.updated(HK2Main.java:102)
      at
      org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1389)
      at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)

      #]

      Fix would be to make sure that the connector-resource (including its
      resource-ref) is enabled, resource-adapter (including its application-ref) is
      enabled and then process the resource.

        Activity

        Hide
        Jagadish added a comment -

        setting target milestone

        Show
        Jagadish added a comment - setting target milestone
        Hide
        Jagadish added a comment -

        Seems to be fixed while introducing support for ResourcesUtil. We check whether
        the resource-adapter is enabled and its resource-ref is enabled.

        svn log -v -r 38815
        ------------------------------------------------------------------------
        r38815 | jr158900 | 2010-07-19 20:38:51 +0530 (Mon, 19 Jul 2010) | 6 lines
        Changed paths:
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ConnectorRuntime.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/DeferredResourceConfig.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ConnectorService.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorConfigParserUtils.java
        A
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorRARClassLoader.java
        (from
        /trunk/v2/appserv-core/src/java/com/sun/enterprise/connectors/util/ConnectorRARClassLoader.java:38812)
        A
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/JarResourceExtractor.java
        (from
        /trunk/v2/appserv-core/src/java/com/sun/enterprise/connectors/util/JarResourceExtractor.java:38812)
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourcesUtil.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorResourceDeployer.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/JdbcResourceDeployer.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java
        M
        /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/JdbcRecoveryResourceHandler.java

        Introducing more ResourcesUtil support
        Support for resource-enabled, resource-ref-enabled, application-ref-enabled in
        ResourcesUtil

        Tests Passed : QL(Web, Classic), connector-standalone-cts (Web, Classic)
        ------------------------------------------------------------------------

        Show
        Jagadish added a comment - Seems to be fixed while introducing support for ResourcesUtil. We check whether the resource-adapter is enabled and its resource-ref is enabled. svn log -v -r 38815 ------------------------------------------------------------------------ r38815 | jr158900 | 2010-07-19 20:38:51 +0530 (Mon, 19 Jul 2010) | 6 lines Changed paths: M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ConnectorRuntime.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/DeferredResourceConfig.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/ConnectorService.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorConfigParserUtils.java A /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ConnectorRARClassLoader.java (from /trunk/v2/appserv-core/src/java/com/sun/enterprise/connectors/util/ConnectorRARClassLoader.java:38812) A /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/JarResourceExtractor.java (from /trunk/v2/appserv-core/src/java/com/sun/enterprise/connectors/util/JarResourceExtractor.java:38812) M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/RARUtils.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/util/ResourcesUtil.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/ConnectorResourceDeployer.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/JdbcResourceDeployer.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/ConnectorsRecoveryResourceHandler.java M /trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/recovery/JdbcRecoveryResourceHandler.java Introducing more ResourcesUtil support Support for resource-enabled, resource-ref-enabled, application-ref-enabled in ResourcesUtil Tests Passed : QL(Web, Classic), connector-standalone-cts (Web, Classic) ------------------------------------------------------------------------

          People

          • Assignee:
            Jagadish
            Reporter:
            Jagadish
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: