-
1. Re: Failed to add datasource of sql server in Wildfly 9
xiaomutoun Mar 18, 2016 10:16 AM (in response to xiaomutoun)In the log, I have :
2016-03-18 14:54:11,481 INFO [org.jboss.as.controller.management-deprecated] (XNIO-6 task-5) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=MSSQLDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
2016-03-18 14:54:11,497 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:/MSSQLDS]
2016-03-18 14:54:11,539 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (XNIO-6 task-6) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:336)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:343)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:278)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:1289)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:492)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.internalTestConnection(AbstractPool.java:1071)
at org.jboss.jca.core.connectionmanager.pool.strategy.OnePool.testConnection(OnePool.java:91)
at org.jboss.as.connector.subsystems.common.pool.PoolOperations$TestConnectionInPool.invokeCommandOn(PoolOperations.java:232)
at org.jboss.as.connector.subsystems.common.pool.PoolOperations$1.execute(PoolOperations.java:88)
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:803)
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:601)
at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:362)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:218)
at org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:208)
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(Unknown Source)
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:199)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.resource.ResourceException: IJ031083: Wrong driver class [com.microsoft.sqlserver.jdbc.SQLServerDriver] for this connection URL [jdbc:microsoft:sqlserver://192.168.206.12\influval;DatabaseName=influval_wildfly]
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:314)
... 32 more
2016-03-18 14:54:11,565 ERROR [org.jboss.as.controller.management-operation] (XNIO-6 task-6) WFLYCTL0013: Operation ("test-connection-in-pool") failed - address: ([("subsystem" => "datasources"),
("data-source" => "MSSQLDS")
]) - failure description: "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid"
2016-03-18 14:54:11,581 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0010: Unbound data source [java:/MSSQLDS]
-
2. Re: Failed to add datasource of sql server in Wildfly 9
xiaomutoun Mar 18, 2016 10:57 AM (in response to xiaomutoun)And when I clicked "done" and retest the connection, I had:
2016-03-18 15:11:01,051 INFO [org.jboss.as.controller.management-deprecated] (XNIO-6 task-1) WFLYCTL0028: Attribute 'enabled' in the resource at address '/' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
2016-03-18 15:11:38,661 INFO [org.jboss.as.controller.management-deprecated] (XNIO-6 task-1) WFLYCTL0028: Attribute 'enabled' in the resource at address '/' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
2016-03-18 15:11:43,167 ERROR [org.jboss.as.controller.management-operation] (XNIO-6 task-6) WFLYCTL0013: Operation ("test-connection-in-pool") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "influval_reference_DS")
]) - failure description: "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName: java:/influval_reference_DS"
-
3. Re: Failed to add datasource of sql server in Wildfly 9
mayerw01 Mar 20, 2016 8:49 AM (in response to xiaomutoun)Did you check your <max-pool-size> parameter Can't create MySQL datasource in WildFly 9 CR1
-
4. Re: Failed to add datasource of sql server in Wildfly 9
xiaomutoun Mar 21, 2016 4:59 AM (in response to mayerw01)Yes, I changed the "max pool size" to 100, but it still doesn't work ...
-
5. Re: Failed to add datasource of sql server in Wildfly 9
xiaomutoun Mar 21, 2016 6:53 AM (in response to xiaomutoun)In fact, I changed the connection url and it worked.
Wrong url :
jdbc:microsoft:sqlserver://(ip address):1433;DatabaseName=???
Right url :
jdbc:sqlserver://(ip address):1433;DatabaseName=???
-
6. Re: Failed to add datasource of sql server in Wildfly 9
mayerw01 Mar 21, 2016 6:55 AM (in response to xiaomutoun)Did you also reload the configuration after your change? Are the messages in the log still the same?
-
7. Re: Failed to add datasource of sql server in Wildfly 9
xiaomutoun Mar 21, 2016 8:35 AM (in response to mayerw01)Thank you for your help, in fact it's just because I've entered the wrong connection url. After I corrected it, it started to work.