glassfish
  1. glassfish
  2. GLASSFISH-20931

UnsupportedCharsetException is not handled properly

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0.1
    • Fix Version/s: future release
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Description

      Reproducible operational steps:

      1) set an invalid http.uri-encoding to admin-listener
      asadmin set server.network-config.protocols.protocol.admin-listener.http.uri-encoding=testtest
      server.network-config.protocols.protocol.admin-listener.http.uri-encoding=testtest
      Command set executed successfully.

      2) restart domain
      asadmin restart-domain domain1
      Successfully restarted the domain
      Command restart-domain executed successfully.

      3) access admin console (IE or FireFox)
      http://localhost:4848/common/index.jsf

      got page fault
      HTPP Status 500-

      Detailed logging from server.log

      [2013-12-17T12:27:06.753+1100] [glassfish 4.0] [WARNING] [NCLS-CORE-00090] [javax.enterprise.system.core] [tid: _ThreadID=41 _ThreadName=admin-listener(3)] [timeMillis: 1387243626753] [levelValue: 900] [[
      Internal Server error: /common/index.jsf
      java.nio.charset.UnsupportedCharsetException: testtest
      at java.nio.charset.Charset.forName(Charset.java:543)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:246)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:496)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:175)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:187)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:837)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
      at java.lang.Thread.run(Thread.java:722)

      4) similar issue if set invalid uri-encoding to http-listener-*
      For example,
      asadmin set server.network-config.protocols.protocol.http-listener-1.http.uri-encoding=testtest
      server.network-config.protocols.protocol.http-listener-1.http.uri-encoding=testtest
      Command set executed successfully.

      It will cause 500 page fault to an application page with similar logging in server.log

      5) Suggestion
      It should handle UnsupportedCharsetException properly to avoid throwing it to the top level and create 500 page fault

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Anissa Lam
            Reporter:
            xianwu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: