glassfish
  1. glassfish
  2. GLASSFISH-12830

Updating http element under network-config/protocols/protocol/http-listener-1 fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms04
    • Component/s: rest-interface
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      12,830

      Description

      In GUI REST Interface accessing following REST URL
      http://localhost:4848/management/domain/configs/config/server-config/network-config/protocols/protocol/http-listener-1/http

      and while updating it gives error. The server.log trace is

      [#|2010-07-28T17:48:53.126+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=103;_ThreadName=pool-18-thread-1;|WEB0169:
      Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

      [#|2010-07-28T17:48:53.126+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=103;_ThreadName=pool-18-thread-1;|WEB0169:
      Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

      [#|2010-07-28T17:48:53.126+0530|INFO|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-1;|WEB0169:
      Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

      [#|2010-07-28T17:48:53.134+0530|INFO|glassfish3.1|null|_ThreadID=17;_ThreadName=Thread-1;|Grizzly
      Framework 1.9.19-beta6 started in: 1ms - bound to [0.0.0.0:8080]|#]

      [#|2010-07-28T17:48:53.136+0530|SEVERE|glassfish3.1|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=17;_ThreadName=Thread-1;|Mapped
      exception to response: 500 (Internal Server Error)
      javax.ws.rs.WebApplicationException: java.lang.StringIndexOutOfBoundsException:
      String index out of range: -1
      at
      org.glassfish.admin.rest.resources.TemplateResource.createEntity(TemplateResource.java:201)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:184)
      at
      com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
      at
      com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:118)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
      at
      com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043)
      at
      com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:134)
      at
      org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:163)
      at
      com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
      at
      com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:113)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:823)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:720)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at
      com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:220)
      at
      com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at
      com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at
      com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1937)
      at org.glassfish.admin.rest.Util.getParentName(Util.java:112)
      at org.glassfish.admin.rest.Util.getHtml(Util.java:179)
      at org.glassfish.admin.rest.ResourceUtil.getResponse(ResourceUtil.java:535)
      at
      org.glassfish.admin.rest.resources.TemplateResource.createEntity(TemplateResource.java:195)
      ... 49 more

        Issue Links

          Activity

          Hide
          Jason Lee added a comment -

          Can you give the data you sent as the payload?

          Show
          Jason Lee added a comment - Can you give the data you sent as the payload?
          Hide
          Jason Lee added a comment -

          It was actually easy enough to reproduce. Fix committed.

          Show
          Jason Lee added a comment - It was actually easy enough to reproduce. Fix committed.

            People

            • Assignee:
              Jason Lee
              Reporter:
              srinik76
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: