glassfish
  1. glassfish
  2. GLASSFISH-14130

flush button in connection pool GUI doesn't work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_dev
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,130

      Description

      I created a connection pool and associated JDBC resource like this:

      asadmin create-jdbc-connection-pool
      --datasourceclassname=com.mysql.jdbc.jdbc2.optional.MysqlDataSource
      --restype=javax.sql.DataSource --description "Test connection pool" --property
      User=scott:Password=tiger:DatabaseName=DB:Port=3306:ServerName=localhost
      "TestConnectionPool"

      asadmin create-jdbc-resource --connectionpoolid "TestConnectionPool"
      --description "Test JDBC resource" jdbc/DB

      Then I navigated to the GUI panel that shows attributes about the connection pool.

      I pressed the flush button.

      I got the following stack:

      [#|2010-10-21T16:07:15.329-0400|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=17;_ThreadName=Thread-1;|RAR8023:
      Flush Connection Pool did not happen as pool - TestConnectionPool is not
      initialized|#]

      [#|2010-10-21T16:07:15.332-0400|SEVERE|glassfish3.1|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=17;_ThreadName=Thread-1;|The
      RuntimeException could not be mapped to a response, re-throwing to the HTTP
      container
      org.glassfish.admin.rest.CliFailureException: Failed to flush connection pool
      TestConnectionPool due to Flush Connection Pool failed for TestConnectionPool.
      Please see server.log for more details..
      at
      org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommand(TemplateExecCommand.java:131)
      at
      org.glassfish.admin.rest.resources.TemplateCommandPostResource.processPost(TemplateCommandPostResource.java:84)
      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$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:168)
      at
      com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
      at
      com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:121)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
      at
      com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:121)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
      at
      com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
      at
      com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
      at
      com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
      at
      com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
      at
      com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:180)
      at
      com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:145)
      at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:176)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:721)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1014)
      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:680)
      Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException:
      Flush Connection Pool failed for TestConnectionPool. Please see server.log for
      more details.
      at
      com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl.flushConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:1501)
      at
      com.sun.enterprise.connectors.ConnectorRuntime.flushConnectionPool(ConnectorRuntime.java:1414)
      at
      org.glassfish.connectors.admin.cli.FlushConnectionPool.execute(FlushConnectionPool.java:135)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:353)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:368)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1076)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:94)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1225)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1214)
      at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:177)
      at
      org.glassfish.admin.rest.resources.TemplateExecCommand.executeCommand(TemplateExecCommand.java:122)
      ... 39 more

      #]

      [#|2010-10-21T16:07:15.351-0400|SEVERE|glassfish3.1|org.glassfish.admingui|_ThreadID=17;_ThreadName=Thread-1;id=TestConnectionPool;|RestResponse.getResponse()
      failed. endpoint =
      'http://localhost:4848/management/domain/resources/flush-connection-pool.json';
      attrs = '

      {id=TestConnectionPool}

      '; RestResponse: {
      "message": "Failed to flush connection pool TestConnectionPool due to Flush
      Connection Pool failed for TestConnectionPool. Please see server.log for more
      details..",
      "exit_code": "FAILURE"
      }|#]

        Activity

        Hide
        ljnelson added a comment -

        So where is the initialize button? Or why is the flush button not disabled?
        How can I know this? What prevents me from pressing the flush button and
        causing an error whose root cause is opaque to me? That's my issue.

        Show
        ljnelson added a comment - So where is the initialize button? Or why is the flush button not disabled? How can I know this? What prevents me from pressing the flush button and causing an error whose root cause is opaque to me? That's my issue.
        Hide
        Jagadish added a comment -

        Once the pool is initialized ie., any application has used the pool, triggering
        flush-connection-pool will recreate the pool.

        Show
        Jagadish added a comment - Once the pool is initialized ie., any application has used the pool, triggering flush-connection-pool will recreate the pool.
        Hide
        Jagadish added a comment -

        Following server.log message indicates the reason why flush connection pool failed.
        If the pool is not initialized, flush does not have a role.

        [#|2010-10-21T16:07:15.329-0400|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=17;_ThreadName=Thread-1;|RAR8023:
        Flush Connection Pool did not happen as pool - TestConnectionPool is not
        initialized|#]

        Show
        Jagadish added a comment - Following server.log message indicates the reason why flush connection pool failed. If the pool is not initialized, flush does not have a role. [#|2010-10-21T16:07:15.329-0400|WARNING|glassfish3.1|javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.pool|_ThreadID=17;_ThreadName=Thread-1;|RAR8023: Flush Connection Pool did not happen as pool - TestConnectionPool is not initialized|#]
        Hide
        sumasri added a comment -

        If flush fails, GUI displays the proper flush error message in console. In this
        case, it is displaying
        "Error An error has occurred
        Failed to flush connection pool TestConnectionPool due to Flush Connection Pool
        failed for TestConnectionPool. Please see server.log for more details".

        From GUI side, there is no issue.
        Transferring it to JDBC team to look into the issue why flush is failing.

        Show
        sumasri added a comment - If flush fails, GUI displays the proper flush error message in console. In this case, it is displaying "Error An error has occurred Failed to flush connection pool TestConnectionPool due to Flush Connection Pool failed for TestConnectionPool. Please see server.log for more details". From GUI side, there is no issue. Transferring it to JDBC team to look into the issue why flush is failing.

          People

          • Assignee:
            Jagadish
            Reporter:
            ljnelson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: