glassfish
  1. glassfish
  2. GLASSFISH-16848

Unable to embed GlassFish in Windows platform using static-shell.jar

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.1_b10, 4.0
    • Component/s: embedded
    • Labels:
      None
    • Environment:

      Windows.

      Description

      In Windows OS, if I try to embed glassfish using simple code as below, and run it using S1AS_HOME\lib\embedded\glassfish-embedded-static-shell.jar then I see "Provider already mapped" error.

      Test.java :

      public class Test {
          public static void main(String... args) throws Exception {
              GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish();
              glassfish.start();
          }
      }
      

      Run it with

       java -cp %S1AS_HOME%\lib\embedded\glassfish-embedded-static-shell.jar;. Test 

      You will see

      SEVERE: MNTG0301:Cannot process XML ProbeProvider, xml = META-INF/gfprobe-provider.xml
      java.lang.IllegalStateException: Provider already mapped glassfish:javamail:smtp-transport
              at org.glassfish.flashlight.impl.core.ProbeProviderRegistry.registerProbeProvider(ProbeProviderRegistry.java:100
      )
              at org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.registerProvider(FlashlightProbeProvide
      rFactory.java:539)
              at org.glassfish.flashlight.impl.provider.FlashlightProbeProviderFactory.processXMLProbeProviders(FlashlightProb
      eProviderFactory.java:364)
              at org.glassfish.admin.monitor.MonitoringBootstrap.processProbeProviderXML(MonitoringBootstrap.java:473)
      
      

      This happens only in Windows OS. Works fine on Solaris, Linux, etc.

      It might be a regression in 3.1.1

        Activity

        Hide
        Bhavanishankar added a comment -

        Added "3.1.1-scrubbed" tag.

        This must be fixed in 3.1.1.

        Show
        Bhavanishankar added a comment - Added "3.1.1-scrubbed" tag. This must be fixed in 3.1.1.
        Hide
        scatari added a comment -

        Needed for embedded API support.

        Show
        scatari added a comment - Needed for embedded API support.
        Show
        Bhavanishankar added a comment - This has been fixed in 3.1.1 and trunk. Fix details: http://java.net/projects/hk2/lists/commits/archive/2011-06/message/41 http://java.net/projects/hk2/lists/commits/archive/2011-06/message/42 http://java.net/projects/glassfish/lists/commits/archive/2011-06/message/409 http://java.net/projects/glassfish/lists/commits/archive/2011-06/message/410

          People

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

            Dates

            • Created:
              Updated:
              Resolved: