glassfish
  1. glassfish
  2. GLASSFISH-17745

[Servlet3.0] An internal server error(Grizzly1.9.39) happened when execute Servlet 3.0 I18N testing both in GB2312 and ISO-8859-1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 3.1.2_b09
    • Fix Version/s: None
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Server OS: OEL 5 x64 w/JDK 6 u29 32bit; OEL 5 x86 w/JDK 6 u26 32bit
      Bundle: glassfish-3.1.2-b09-ml.zip

      Description

      During Servlet 3.0 I18N testing, it happens an internal server error(Grizzly1.9.39) both in GB2312 and ISO-8859-1.

      Test Case Description:
      It tests an asynchnorous operation. In servlet_1, using req.startAsync() to new an AsyncContext, and complete servlet_1. In newly created servlet_2, getting two seconds sleep and call AsyncContext.complete() to complete it. It displays characters in GB2312.

      The server.log file contains several messages about a NullPointerException and an InvalidStateException.

      [#|2011-11-14T23:49:43.607+0800|SEVERE|glassfish3.1.2|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=19;_ThreadName=Thread-2;|PWC3989: An exception or error occurred in the container during the request processing
      java.lang.NullPointerException
      at org.apache.catalina.connector.Request.setAttribute(Request.java:1688)
      at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:570)
      at org.apache.catalina.core.StandardWrapperValve.exception(StandardWrapperValve.java:465)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:340)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      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(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:833)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:730)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1031)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      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:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)

      #]

        Activity

        Hide
        Amy Roh added a comment -

        Can you attach your test web application and the full server.log so we can reproduce the issue?

        Thanks,
        Amy

        Show
        Amy Roh added a comment - Can you attach your test web application and the full server.log so we can reproduce the issue? Thanks, Amy
        Hide
        sunny-gui added a comment -

        Attached source file and server log file for your reference.

        Show
        sunny-gui added a comment - Attached source file and server log file for your reference.
        Hide
        sunny-gui added a comment -

        add screen shot for your reference.

        Show
        sunny-gui added a comment - add screen shot for your reference.
        Hide
        Amy Roh added a comment -

        I tried your source in a war file (attached) and it is working fine for me with 3.1.2 b09. Can you attach a war where I can reproduce the issue?

        Show
        Amy Roh added a comment - I tried your source in a war file (attached) and it is working fine for me with 3.1.2 b09. Can you attach a war where I can reproduce the issue?
        Hide
        Amy Roh added a comment -

        Add working screen shot.

        Show
        Amy Roh added a comment - Add working screen shot.
        Hide
        sunny-gui added a comment -

        Hi,

        Sorry for confusing. This issue only happens when running by script which including a lot of another test cases. and usually the first time is okay, but when you running the script second time, two test cases which related TestAsyncServlet*** both in GB2312 and ISO-8859-1 will get error.

        Here are vnc info, you can get try in this machine immediately.

        vnc: sgtcnpc108v2.cn.oracle.com:1 (pwd: welcome)
        username/pwd: root/welcome

        You can execute script at /export/i18n_sqe/appserver-sqe/pe/i18n/tomcat/servlet/product_test/servlet3_0/

        Thanks.

        Show
        sunny-gui added a comment - Hi, Sorry for confusing. This issue only happens when running by script which including a lot of another test cases. and usually the first time is okay, but when you running the script second time, two test cases which related TestAsyncServlet*** both in GB2312 and ISO-8859-1 will get error. Here are vnc info, you can get try in this machine immediately. vnc: sgtcnpc108v2.cn.oracle.com:1 (pwd: welcome) username/pwd: root/welcome You can execute script at /export/i18n_sqe/appserver-sqe/pe/i18n/tomcat/servlet/product_test/servlet3_0/ Thanks.
        Hide
        Amy Roh added a comment -

        Can you simplify your test/script and create a war that can reproduce the error (if run the second time)? If it only happens when running in the test suite, it could be an issue with the test suite? Did the test pass with the previous version of GF?

        Show
        Amy Roh added a comment - Can you simplify your test/script and create a war that can reproduce the error (if run the second time)? If it only happens when running in the test suite, it could be an issue with the test suite? Did the test pass with the previous version of GF?
        Hide
        oleksiys added a comment -

        to rid of the error please comment out ctx.complete() line in all the async dispatcher tests.
        Like:

        try

        { Thread.sleep(2000); }

        catch (InterruptedException e)

        { // TODO Auto-generated catch block e.printStackTrace(); }

        // ctx.complete();

        Show
        oleksiys added a comment - to rid of the error please comment out ctx.complete() line in all the async dispatcher tests. Like: try { Thread.sleep(2000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } // ctx.complete();
        Hide
        oleksiys added a comment -

        pls. reopen the issue if you still see the problem.

        Show
        oleksiys added a comment - pls. reopen the issue if you still see the problem.

          People

          • Assignee:
            oleksiys
            Reporter:
            sunny-gui
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: