Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V3, v3.0.1, 3.1_b02, 3.1_ms01, 3.1_b03, 3.1_b05, 3.1_b06, 3.1_ms02, 3.1_b07, 3.1_b08, 3.1_b10, 3.1_ms03, 3.1_b12, 3.1_b13, 3.1_b14, 3.1_b15, 3.1_b16, 3.1_ms04, 3.1_b17, 3.1_b18, 3.1_b19, 3.1_b20, 3.1_ms05, 3.1_b21, 3.1_b22, 3.1_b23, 3.1_b24, 3.1_b25, 3.1_b26, 3.1_ms06, 3.1_b27, 3.1_b28, 3.1_b29, 3.1_b30, 3.1_b31, 3.1_b32, 3.1_ms07, 3.1_b33
    • Fix Version/s: 3.1.2.2
    • Component/s: web_container
    • Labels:
      None

      Description

      When an Apache web server configured with mod_proxy relays incoming HTTPS request to a Glassfish HTTP listener, everything works fine except when URL are rebuilt by the server (ie when redirecting), because the request scheme is HTTP instead of HTTPS.

      Using Tomcat, we can override the scheme given by the ServletRequest.getScheme() using the "scheme" attribute on the "connector" element in the server.xml.

      There is no equivalent configuration properties in glassfish.

        Activity

        Hide
        oleksiys added a comment -

        fixed

        Show
        oleksiys added a comment - fixed
        Hide
        Kevin Dean added a comment -

        Is it possible to get this for GlassFish 3.1.2.2? Under that version it results in the following on startup:

        java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
        Caused by: java.lang.LinkageError: injection failed on class com.sun.enterprise.v3.admin.PublicAdminAdapter from org.apache.felix.framework.BundleWiringImpl@5dcd1c83
        at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256)
        at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93)
        at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126)
        at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
        at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
        at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
        at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
        at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:703)
        at java.util.AbstractList$Itr.next(AbstractList.java:358)
        at com.sun.enterprise.v3.services.impl.GrizzlyService.registerNetworkProxy(GrizzlyService.java:541)
        at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:456)
        at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
        at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
        at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
        at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
        at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
        at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253)
        at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145)
        at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
        ... 6 more
        Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [67] State [INSTALLED] [org.glassfish.main.common.container-common(Container Common):3.1.2.1-SNAPSHOT]
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344)
        at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124)
        at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111)
        at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135)
        at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
        at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:798)
        at com.sun.hk2.component.InjectInjectionResolver.getServiceInjectValue(InjectInjectionResolver.java:147)
        at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:88)
        at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143)
        ... 30 more
        Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.main.common.container-common [67]: Unable to resolve 67.0: missing requirement [67.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.grizzly.comet)(version>=1.9.0)) [caused by: Unable to resolve 105.0: missing requirement [105.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.grizzly.arp)(version>=1.9.50))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
        ... 39 more

        Show
        Kevin Dean added a comment - Is it possible to get this for GlassFish 3.1.2.2? Under that version it results in the following on startup: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97) at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55) Caused by: java.lang.LinkageError: injection failed on class com.sun.enterprise.v3.admin.PublicAdminAdapter from org.apache.felix.framework.BundleWiringImpl@5dcd1c83 at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259) at java.security.AccessController.doPrivileged(Native Method) at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:256) at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:93) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:126) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:703) at java.util.AbstractList$Itr.next(AbstractList.java:358) at com.sun.enterprise.v3.services.impl.GrizzlyService.registerNetworkProxy(GrizzlyService.java:541) at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:456) at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131) at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91) at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82) at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:253) at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:145) at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:136) at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79) at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63) at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:69) at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117) ... 6 more Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [67] State [INSTALLED] [org.glassfish.main.common.container-common(Container Common):3.1.2.1-SNAPSHOT] at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177) at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344) at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124) at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111) at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135) at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78) at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:798) at com.sun.hk2.component.InjectInjectionResolver.getServiceInjectValue(InjectInjectionResolver.java:147) at com.sun.hk2.component.InjectInjectionResolver.getValue(InjectInjectionResolver.java:88) at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:143) ... 30 more Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.main.common.container-common [67] : Unable to resolve 67.0: missing requirement [67.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.grizzly.comet)(version>=1.9.0)) [caused by: Unable to resolve 105.0: missing requirement [105.0] osgi.wiring.package; (&(osgi.wiring.package=com.sun.grizzly.arp)(version>=1.9.50))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826) at org.apache.felix.framework.Felix.startBundle(Felix.java:1868) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944) at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169) ... 39 more
        Hide
        oleksiys added a comment -

        Glassfish 3.1.2.2 should have this already fixed. No need for patches.

        Show
        oleksiys added a comment - Glassfish 3.1.2.2 should have this already fixed. No need for patches.
        Hide
        Kevin Dean added a comment -

        Thanks. I have tested it and confirmed that it's working. The link that led me to this case said that it would not be fixed until 3.2 and the "fix version" on this page is still saying "future release", hence my request.

        Show
        Kevin Dean added a comment - Thanks. I have tested it and confirmed that it's working. The link that led me to this case said that it would not be fixed until 3.2 and the "fix version" on this page is still saying "future release", hence my request.
        Hide
        oleksiys added a comment -

        you're right. 3.1.2.2 haven't been planned in the beginning.
        i'll update the 'fix version'

        Show
        oleksiys added a comment - you're right. 3.1.2.2 haven't been planned in the beginning. i'll update the 'fix version'

          People

          • Assignee:
            oleksiys
            Reporter:
            cedric_marcone
          • Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: