Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-1030

"Test Connection" feature from the Datasources configuration UI with a Postgres DS inadvertently registers a "phantom" DS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 2.8.15
    • Fix Version/s: 2.8.18
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1. Add the postgresql-9.4-1201.jdbc41 driver/module to WildFly
      2. Open the web console
      3. Configure a new datasource (selecting the new Postgres driver) until the last step/page, without finalizing the configuration
      4. Click on "Test connection"

      Show
      1. Add the postgresql-9.4-1201.jdbc41 driver/module to WildFly 2. Open the web console 3. Configure a new datasource (selecting the new Postgres driver) until the last step/page, without finalizing the configuration 4. Click on "Test connection"
    • Release Notes Text:

      Description

      After adding the postgresql-9.4-1201.jdbc41 driver/module to WildFly and configuring a datasource in the web console, when I click on "Test connection" instead of finishing the configuration, a success message appears along with a "Reload server now" message because the datasource has inadvertently been registered already; and when the server is reloaded, I can't see the newly registered datasource in the web console. Below is the console log I get when I try to actually finalize the same datasource configuration after having but tested its connection and reloaded the server as per the web console messages:

      22:41:08,708 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-7) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("data-source" => "CominottiDS")
      ]): org.jboss.msc.service.DuplicateServiceException: Service org.wildfly.data-source.CominottiDS is already registered
              at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
              at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
              at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
              at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
              at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
              at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
              at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401)
              at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
              at org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:2129)
              at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceAdd.firstRuntimeStep(AbstractDataSourceAdd.java:185)
              at org.jboss.as.connector.subsystems.datasources.AbstractDataSourceAdd.performRuntime(AbstractDataSourceAdd.java:106)
              at org.jboss.as.controller.AbstractAddStepHandler.performRuntime(AbstractAddStepHandler.java:337)
              at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:151)
              at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
              at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
              at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
              at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344)
              at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:392)
              at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217)
              at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:212)
              at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:72)
              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler$1.run(SubjectDoAsHandler.java:68)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:422)
              at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)
              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:68)
              at org.jboss.as.domain.http.server.security.SubjectDoAsHandler.handleRequest(SubjectDoAsHandler.java:63)
              at io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:56)
              at org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:95)
              at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            Assignee:
            heiko.braun Heiko Braun
            Reporter:
            dcominottim Danilo Cominotti Marques (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: