1 Reply Latest reply on Feb 28, 2017 10:40 AM by Ramesh Reddy

    teiid : Unable to create data-source with same name once deleted.

    Kulbhushan Chaskar Master

      Hi,

       

      I am ending up with the error on creating a data-source with the same name as deleted one.

       

      Steps to reproduce:

      1. Create a datasource say DS1 from jobss admin console.

      2. Delete it from jboss admin console.

      3. Try to recreate same data-source using the same name i.e. DS1

      4. Getting below exception on jboss server.

       

      20:46:38,811 ERROR [org.jboss.as.controller.management-operation] (management task-7)  WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "DS1")

      ]): org.jboss.msc.service.DuplicateServiceException: Service org.wildfly.data-source.DS1is 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)

       

       

      I think it will also gives same error when using teiid admin api.

       

      Thanks,

      Kulbhushan Chaskar.