glassfish
  1. glassfish
  2. GLASSFISH-13204

When CDI is enabled Web container consumes form parameters

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_dev
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      13,204
    • Status Whiteboard:
      Hide

      weld-int-required

      Show
      weld-int-required

      Description

      When CDI is enabled and when the Web container receives a POST request with form
      parameters ("application/x-www-form-urlencoded") the request entity is consumed.

      Disable CDI and the request entity is not consumed. For a reproducible test case
      see the Jersey issue:

      https://jersey.dev.java.net/issues/show_bug.cgi?id=579

        Activity

        Hide
        sandoz added a comment -

        Note although this issue points to a reproducible test case using Jersey it is
        possible to reproduce using just a Servlet and reading from the input stream.

        Show
        sandoz added a comment - Note although this issue points to a reproducible test case using Jersey it is possible to reproduce using just a Servlet and reading from the input stream.
        Hide
        jsl123 added a comment -
            • Issue 13204 has been confirmed by votes. ***
        Show
        jsl123 added a comment - Issue 13204 has been confirmed by votes. ***
        Hide
        Sivakumar Thyagarajan added a comment -

        Need to reproduce and analyse. Targetting for MS6

        Show
        Sivakumar Thyagarajan added a comment - Need to reproduce and analyse. Targetting for MS6
        Hide
        Sivakumar Thyagarajan added a comment -

        Hi Paul

        Whien I tried to reproduce this with latest GF, I got this NPE while exercising
        the test:
        curl -d x=b -b param=y http://localhost:8080/PGFormTest/formTest/

        Could you please help?

        [#|2010-10-
        24T14:05:57.360+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.g
        lassfish.deployment.admin|_ThreadID=14;_ThreadName=Thread-1;|PGFormTest was
        successfully deployed in 12,258 milliseconds.|#]

        [#|2010-10-
        24T14:06:10.222+0530|INFO|glassfish3.1|com.sun.jersey.api.core.WebAppResourceCon
        fig|_ThreadID=14;_ThreadName=Thread-1;|Scanning for root resource and provider
        classes in the Web app resource paths:
        /WEB-INF/lib
        /WEB-INF/classes|#]

        [#|2010-10-
        24T14:06:11.198+0530|INFO|glassfish3.1|com.sun.jersey.api.core.ScanningResourceC
        onfig|_ThreadID=14;_ThreadName=Thread-1;|Root resource classes found:
        class com.kickstone.test.resources.Test|#]

        [#|2010-10-
        24T14:06:11.199+0530|INFO|glassfish3.1|com.sun.jersey.api.core.ScanningResourceC
        onfig|_ThreadID=14;_ThreadName=Thread-1;|No provider classes found.|#]

        [#|2010-10-
        24T14:06:11.489+0530|SEVERE|glassfish3.1|javax.enterprise.system.container.web.c
        om.sun.enterprise.web|_ThreadID=121;_ThreadName=http-thread-pool-
        8080(1);|WebModule[/PGFormTest]StandardWrapper.Throwable
        java.lang.NullPointerException
        at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init>
        (CDIComponentProviderFactory.java:94)
        at
        com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize
        (CDIComponentProviderFactoryInitializer.java:75)
        at
        com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:55
        4)
        at
        com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.confi
        gure(ServletContainer.java:293)
        at
        com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:586)
        at
        com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213)
        at
        com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java
        :355)
        at
        com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java
        :538)
        at javax.servlet.GenericServlet.init(GenericServlet.java:244)
        at
        org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1427)
        at
        org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1059)
        at
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:1
        89)
        at
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
        75)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at
        org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
        at
        com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingS
        tandardPipeline.java:91)
        at
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
        at
        org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
        at
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
        at
        com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java
        :170)
        at
        com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
        at
        com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:22
        5)
        at
        com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.
        java:137)
        at
        com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
        at
        com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
        at
        com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
        at
        com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54
        )
        at
        com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
        at
        com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:53
        2)
        at
        com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
        at java.lang.Thread.run(Thread.java:619)

        Show
        Sivakumar Thyagarajan added a comment - Hi Paul Whien I tried to reproduce this with latest GF, I got this NPE while exercising the test: curl -d x=b -b param=y http://localhost:8080/PGFormTest/formTest/ Could you please help? [#|2010-10- 24T14:05:57.360+0530|INFO|glassfish3.1|javax.enterprise.system.tools.admin.org.g lassfish.deployment.admin|_ThreadID=14;_ThreadName=Thread-1;|PGFormTest was successfully deployed in 12,258 milliseconds.|#] [#|2010-10- 24T14:06:10.222+0530|INFO|glassfish3.1|com.sun.jersey.api.core.WebAppResourceCon fig|_ThreadID=14;_ThreadName=Thread-1;|Scanning for root resource and provider classes in the Web app resource paths: /WEB-INF/lib /WEB-INF/classes|#] [#|2010-10- 24T14:06:11.198+0530|INFO|glassfish3.1|com.sun.jersey.api.core.ScanningResourceC onfig|_ThreadID=14;_ThreadName=Thread-1;|Root resource classes found: class com.kickstone.test.resources.Test|#] [#|2010-10- 24T14:06:11.199+0530|INFO|glassfish3.1|com.sun.jersey.api.core.ScanningResourceC onfig|_ThreadID=14;_ThreadName=Thread-1;|No provider classes found.|#] [#|2010-10- 24T14:06:11.489+0530|SEVERE|glassfish3.1|javax.enterprise.system.container.web.c om.sun.enterprise.web|_ThreadID=121;_ThreadName=http-thread-pool- 8080(1);|WebModule [/PGFormTest] StandardWrapper.Throwable java.lang.NullPointerException at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactory.<init> (CDIComponentProviderFactory.java:94) at com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize (CDIComponentProviderFactoryInitializer.java:75) at com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:55 4) at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.confi gure(ServletContainer.java:293) at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:586) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java :355) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java :538) at javax.servlet.GenericServlet.init(GenericServlet.java:244) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1427) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1059) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:1 89) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1 75) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingS tandardPipeline.java:91) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java :170) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:22 5) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain. java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54 ) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:53 2) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:619)
        Hide
        jsl123 added a comment -

        This is unfortunately caused by another CDI related bug in jersey. It has been
        fixed in the lastest svn release.

        Show
        jsl123 added a comment - This is unfortunately caused by another CDI related bug in jersey. It has been fixed in the lastest svn release.
        Hide
        sandoz added a comment -

        You are hitting proxy bug, which can occur on re-deployments. Can you do a fresh
        restart of GF and deploy?

        We worked around the proxy issue for Jersey 1.5-ea03 and GF source has now been
        updated to that version

        Show
        sandoz added a comment - You are hitting proxy bug, which can occur on re-deployments. Can you do a fresh restart of GF and deploy? We worked around the proxy issue for Jersey 1.5-ea03 and GF source has now been updated to that version
        Hide
        Sivakumar Thyagarajan added a comment -

        Marking this as weld-int-required as Paul confirmed that this issue goes away
        with an integration of weld-trunk. As soon as we push a latest Weld integration,
        I will test this and close it.

        Show
        Sivakumar Thyagarajan added a comment - Marking this as weld-int-required as Paul confirmed that this issue goes away with an integration of weld-trunk. As soon as we push a latest Weld integration, I will test this and close it.
        Hide
        Sivakumar Thyagarajan added a comment -

        Closing this issue as I could verify that this scenario works with the test case
        provided in JERSEY-579 against latest 3.1 trunk. Integration of Weld 1.1.0.Beta2
        into GlassFish 3.1 was complete a couple of days ago. The trunk (post svn commit
        42731) or a nightly after saturday (b30-11_13) could be used to test this
        integration.

        Show
        Sivakumar Thyagarajan added a comment - Closing this issue as I could verify that this scenario works with the test case provided in JERSEY-579 against latest 3.1 trunk. Integration of Weld 1.1.0.Beta2 into GlassFish 3.1 was complete a couple of days ago. The trunk (post svn commit 42731) or a nightly after saturday (b30-11_13) could be used to test this integration.

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            sandoz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: