glassfish
  1. glassfish
  2. GLASSFISH-15772

3.0.1 to 3.1 update requires removal of osgi-cache for the DAS to start

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b40
    • Fix Version/s: 3.1.1_b09, 4.0
    • Component/s: OSGi
    • Labels:
      None
    • Environment:

      Solaris 11 Express

      Description

      After upgrading from 3.0.1 to 3.1 I can't start the DAS unless I remove osgi-cache. Here are the details:

      • Unzipped glassfish-3.0.1-b22.zip
      • "pkg list", answer 'y' to install pkg
      • "pkg list" to verify package versions
      • asadmin start-domain, asadmin version, asadmin stop-domain
      • Edit .org.opensolaris,pkg/cfg_cache and change
        preferred-authority = dev.glassfish.org
      • pkg image-update, pkg list to verify 3.1 packages are installed
      • asadmin start-domain appears to work, but log file has the following
        exception and no subsequent asdmin commands can contact the DAS.
        -----------------------------------------------------------------
        [#|2011-01-31T15:52:41.334-0800|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1;_ThreadName=Thread-1;|java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
        Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [43] State [INSTALLED] [org.glassfish.web.weld-integration(Weld integration for glassfish):3.1]
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:174)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:341)
        at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:121)
        at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:108)
        at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:132)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:73)
        at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:698)
        at java.util.AbstractList$Itr.next(AbstractList.java:345)
        at java.util.AbstractCollection.toArray(AbstractCollection.java:124)
        at java.util.ArrayList.addAll(ArrayList.java:472)
        at com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(SnifferManagerImpl.java:92)
        at com.sun.enterprise.v3.server.PostInitializer.postConstruct(PostInitializer.java:63)
        at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:128)
        at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:88)
        at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:79)
        at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:64)
        at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:136)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:73)
        at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:326)
        at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:135)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
        ... 6 more
        Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.web.weld-integration [43]: Unable to resolve 43.1: missing requirement [43.1] package; (&(package=com.sun.enterprise.security)(version>=3.1.0)) [caused by: Unable to resolve 208.1: missing requirement [208.1] package; (&(package=com.sun.jaspic.config.factory)(version>=3.1.0)) [caused by: Unable to resolve 263.0: missing requirement [263.0] package; (package=com.sun.security.auth.login)]]
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:166)
        ... 27 more
        #]

      [#|2011-01-31T15:52:41.368-0800|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=39;_ThreadName=Thread-1;|*ERROR* Configuration org.apache.felix.fileinstall.510e2b02-1ab9-4285-9170-c30d9f443728 referred to by factory org.apache.felix.fileinstall does not exist|#]
      -----------------------------------------------------------------

      • If I kill the DAS, remove osgi-cache, then start the domain the domain
        comes up OK.
      • If I repeat the test, but try to start the 3.1 domain with --upgrade
        it also fails with an OSGi exception (albeit a different one):

      ERROR: Error starting file:/export2/home/dipol/tmp/gf/glassfishv3/glassfish/modules/autostart/osgi-web-container.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.osgi-web-container [217]: Unable to resolve 217.0: missing requirement [217.0] package; (&(package=com.sun.enterprise.web)(version>=3.0.0)) [caused by: Unable to resolve 175.1: missing requirement [175.1] package; (&(package=com.sun.web.security)(version>=3.1.0)) [caused by: Unable to resolve 188.1: missing requirement [188.1] package; (&(package=com.sun.enterprise.security)(version>=3.1.0)) [caused by: Unable to resolve 208.1: missing requirement [208.1] package; (&(package=com.sun.jaspic.config.factory)(version>=3.1.0)) [caused by: Unable to resolve 263.0: missing requirement [263.0] package; (package=com.sun.security.auth.login)]]]])
      org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.osgi-web-container [217]: Unable to resolve 217.0: missing requirement [217.0] package; (&(package=com.sun.enterprise.web)(version>=3.0.0)) [caused by: Unable to resolve 175.1: missing requirement [175.1] package; (&(package=com.sun.web.security)(version>=3.1.0)) [caused by: Unable to resolve 188.1: missing requirement [188.1] package; (&(package=com.sun.enterprise.security)(version>=3.1.0)) [caused by: Unable to resolve 208.1: missing requirement [208.1] package; (&(package=com.sun.jaspic.config.factory)(version>=3.1.0)) [caused by: Unable to resolve 263.0: missing requirement [263.0] package; (package=com.sun.security.auth.login)]]]]
      at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409) (albeit a different one):
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1148)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)
      Exception in thread "main" java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
      at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
      Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [249] State [INSTALLED] [org.glassfish.loadbalancer.load-balancer-admin(Load-Balancer admin):3.1]
      at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:174)
      at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:341)
      at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:121)
      at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:108)
      at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:132)
      at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:73)
      at org.glassfish.config.support.DomainXml.upgrade(DomainXml.java:152)
      at org.glassfish.config.support.DomainXml.run(DomainXml.java:118)
      at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:173)
      at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:155)
      at com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:430)
      at org.jvnet.hk2.osgiadapter.HK2Main.createHabitat(HK2Main.java:93)
      at org.glassfish.kernel.GlassFishActivator$1.newGlassFish(GlassFishActivator.java:104)
      at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
      ... 6 more
      Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.loadbalancer.load-balancer-admin [249]: Unable to resolve 249.0: missing requirement [249.0] package; (&(package=com.sun.enterprise.security.ssl)(version>=3.1.0)) [caused by: Unable to resolve 208.1: missing requirement [208.1] package; (&(package=com.sun.jaspic.config.factory)(version>=3.1.0)) [caused by: Unable to resolve 263.0: missing requirement [263.0] package; (package=com.sun.security.auth.login)]]
      at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
      at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:166)
      ... 19 more

        Issue Links

          Activity

          Hide
          Sanjeeb Sahoo added a comment -

          See the attached patch which does the following:
          When -upgrade option is used, the launcher will rename the osgi-cache directory to osgi-cache$timestamp. It will log a message with the renamed directory name. If it fails to rename for whatever reason (e.g., some process holding a lock on the file e.g.), then it throws an exception. This patch is a minor improvement over what Bobby suggested earlier in a private email.

          I have tested this patch and it works. Please note, I don't own admin module, so it will be better if someone in admin team checks this in. Nazrul, please reassign if you agree to this.

          Show
          Sanjeeb Sahoo added a comment - See the attached patch which does the following: When - upgrade option is used, the launcher will rename the osgi-cache directory to osgi-cache $timestamp. It will log a message with the renamed directory name. If it fails to rename for whatever reason (e.g., some process holding a lock on the file e.g.), then it throws an exception. This patch is a minor improvement over what Bobby suggested earlier in a private email. I have tested this patch and it works. Please note, I don't own admin module, so it will be better if someone in admin team checks this in. Nazrul, please reassign if you agree to this.
          Hide
          Sanjeeb Sahoo added a comment -

          Committed the work around suggested in the earlier attached patch.

          trunk:
          Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java
          Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/LocalStrings.properties
          Transmitting file data ..
          Committed revision 44878.

          3.1 branch:
          Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java
          Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/LocalStrings.properties
          Transmitting file data ..
          Committed revision 44879.

          Excluding this bug from 3.1 release as well.

          Show
          Sanjeeb Sahoo added a comment - Committed the work around suggested in the earlier attached patch. trunk: Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/LocalStrings.properties Transmitting file data .. Committed revision 44878. 3.1 branch: Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/GFLauncher.java Sending admin/launcher/src/main/java/com/sun/enterprise/admin/launcher/LocalStrings.properties Transmitting file data .. Committed revision 44879. Excluding this bug from 3.1 release as well.
          Hide
          Chris Kasso added a comment -
          Show
          Chris Kasso added a comment - This issue depends on: https://issues.apache.org/jira/browse/FELIX-2822
          Hide
          Sanjeeb Sahoo added a comment -

          Can the submitter try upgrading from 3.0.x to 3.1.x and tell me if they still any issues? This should no longer be an issue after the work we have done wrt osgi-cache in 3.1.1. If it is not an issue, I would like to mark it as resolved in 3.1.1.

          Show
          Sanjeeb Sahoo added a comment - Can the submitter try upgrading from 3.0.x to 3.1.x and tell me if they still any issues? This should no longer be an issue after the work we have done wrt osgi-cache in 3.1.1. If it is not an issue, I would like to mark it as resolved in 3.1.1.
          Hide
          Sanjeeb Sahoo added a comment -

          This bug is fixed as part of the following check in which addresses a few other similar bugs as well. See svn log for details.
          3.1.1 checkin details:
          Sending core/bootstrap/osgi.bundle
          Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainHelper.java
          Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/AutoProcessor.java
          Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/Constants.java
          Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/EmbeddedOSGiGlassFishRuntimeBuilder.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishDecorator.java
          Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMainActivator.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishRuntimeDecorator.java
          Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiFrameworkLauncher.java
          Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiGlassFishRuntimeBuilder.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Constants.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntime.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/GlassFishMainActivator.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Jar.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishImpl.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntime.java
          Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntimeBuilder.java
          Sending core/bootstrap/src/main/resources/META-INF/services/org.glassfish.embeddable.spi.RuntimeBuilder
          Sending core/kernel/osgi.bundle
          Sending core/kernel/pom.xml
          Deleting core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java
          Sending osgi-platforms/equinox/src/main/resources/glassfish/osgi/equinox/configuration/config.ini
          Sending osgi-platforms/felix/src/main/resources/glassfish/osgi/felix/conf/config.properties
          Sending packager/glassfish-nucleus/pom.xml
          Sending pom.xml
          Transmitting file data ......................
          Committed revision 47494.

          Forward ported to trunk in svn rev #47505.

          Show
          Sanjeeb Sahoo added a comment - This bug is fixed as part of the following check in which addresses a few other similar bugs as well. See svn log for details. 3.1.1 checkin details: Sending core/bootstrap/osgi.bundle Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainHelper.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/AutoProcessor.java Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/Constants.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/EmbeddedOSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishDecorator.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMainActivator.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishRuntimeDecorator.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiFrameworkLauncher.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Constants.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntime.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/GlassFishMainActivator.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Jar.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishImpl.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntime.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntimeBuilder.java Sending core/bootstrap/src/main/resources/META-INF/services/org.glassfish.embeddable.spi.RuntimeBuilder Sending core/kernel/osgi.bundle Sending core/kernel/pom.xml Deleting core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java Sending osgi-platforms/equinox/src/main/resources/glassfish/osgi/equinox/configuration/config.ini Sending osgi-platforms/felix/src/main/resources/glassfish/osgi/felix/conf/config.properties Sending packager/glassfish-nucleus/pom.xml Sending pom.xml Transmitting file data ...................... Committed revision 47494. Forward ported to trunk in svn rev #47505.

            People

            • Assignee:
              Sanjeeb Sahoo
              Reporter:
              Joe Di Pol
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: