javax.resource.ResourceException: Could not create connection

JBoss Issue Tracker | Jim Tyrrell | 4 years ago
  1. 0

    Start up a host-slave with something like: ./domain.sh --host-config=host-master.xml Update the host-slave.xml with a 29999 in place of the 9999 management port so we can easily run on the same machine. Start it with: ./domain.sh --host-config=host-slave.xml -Djboss.domain.master.address=127.0.0.1 Crate and login with an admin user on the console: Go to the manage deployments tab and upload mysql-connector-java-5.1.20-bin.jar. I assume any driver will work, but this test case is with MySQL. In the console you should see the following: [Server:server-two] 14:15:02,689 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "mysql-connector-java-5.1.20-bin.jar" [Server:server-one] 14:15:02,700 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "mysql-connector-java-5.1.20-bin.jar" [Server:server-one] 14:15:02,884 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1) [Server:server-one] 14:15:02,893 INFO [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011907: Register module: Module "deployment.mysql-connector-java-5.1.20-bin.jar:main" from Service Module Loader [Server:server-two] 14:15:02,895 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1) [Server:server-two] 14:15:02,903 INFO [org.jboss.as.osgi] (MSC service thread 1-8) JBAS011907: Register module: Module "deployment.mysql-connector-java-5.1.20-bin.jar:main" from Service Module Loader [Server:server-one] 14:15:03,048 INFO [org.jboss.as.server] (host-controller-connection-threads - 2) JBAS018559: Deployed "mysql-connector-java-5.1.20-bin.jar" [Server:server-two] 14:15:03,049 INFO [org.jboss.as.server] (host-controller-connection-threads - 2) JBAS018559: Deployed "mysql-connector-java-5.1.20-bin.jar" Showing the jar file has been deployed. Now create a JNDI name for it in the console... Make sure you select a profile that works, in this example full or full-ha will work. Any Name: SampleDS JNDI Name of: java:/IntegrationDatasource Connection URL: jdbc:mysql://localhost:3306/greenfield Username: root Password: blank At this point it does not matter that MySQL is not installed..and that of course the user does not exist...as we will not see this misconfiguration show up at all. Once I save this off and enable it I see something like this in my console: [Server:server-one] 14:19:29,411 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:/IntegrationDatasource] Great it is bound...but... Lets deploy an application...SampleApp.war You see it has deployed: [Server:server-one] 14:21:15,633 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "SampleApp.war" [Server:server-two] 14:21:15,634 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "SampleApp.war" [Server:server-two] 14:21:15,889 INFO [org.jboss.as.osgi] (MSC service thread 1-7) JBAS011907: Register module: Module "deployment.SampleApp.war:main" from Service Module Loader [Server:server-one] 14:21:15,916 INFO [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011907: Register module: Module "deployment.SampleApp.war:main" from Service Module Loader [Server:server-two] 14:21:15,998 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /SampleApp [Server:server-one] 14:21:16,024 INFO [org.jboss.web] (MSC service thread 1-6) JBAS018210: Registering web context: /SampleApp [Server:server-one] 14:21:16,080 INFO [org.jboss.as.server] (host-controller-connection-threads - 5) JBAS018559: Deployed "SampleApp.war" [Server:server-two] 14:21:16,082 INFO [org.jboss.as.server] (host-controller-connection-threads - 5) JBAS018559: Deployed "SampleApp.war" Going to this URL: http://localhost:8080/SampleApp/ I see this in my web browser: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/IntegrationDatasource [Server:server-one] 14:22:04,161 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-/127.0.0.1:8080-2) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection [Server:server-one] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277) [Server:server-one] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235) [Server:server-one] at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761) [Server:server-one] at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343) [Server:server-one] at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [Server:server-one] at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [Server:server-one] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329) [Server:server-one] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302) [Server:server-one] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464) [Server:server-one] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139) [Server:server-one] at org.apache.jsp.index_jsp._jspService(index_jsp.java:73) [Server:server-one] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1] [Server:server-one] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1] [Server:server-one] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1] [Server:server-one] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:] [Server:server-one] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32] [Server:server-one] Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) [Server:server-one] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) [Server:server-one] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096) [Server:server-one] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028) [Server:server-one] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:951) [Server:server-one] at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1717) [Server:server-one] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276) [Server:server-one] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2395) [Server:server-one] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2428) [Server:server-one] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2213) [Server:server-one] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:797) [Server:server-one] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) [Server:server-one] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_32] [Server:server-one] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_32] [Server:server-one] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_32] [Server:server-one] at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_32] [Server:server-one] at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) [Server:server-one] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389) [Server:server-one] at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) [Server:server-one] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249) [Server:server-one] ... 29 more [Server:server-one] [Server:server-one] 14:22:04,170 ERROR [stderr] (http-/127.0.0.1:8080-2) java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/IntegrationDatasource [Server:server-one] 14:22:04,170 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:147) [Server:server-one] 14:22:04,170 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.jsp.index_jsp._jspService(index_jsp.java:73) [Server:server-one] 14:22:04,171 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [Server:server-one] 14:22:04,171 ERROR [stderr] (http-/127.0.0.1:8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [Server:server-one] 14:22:04,171 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [Server:server-one] 14:22:04,171 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [Server:server-one] 14:22:04,172 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [Server:server-one] 14:22:04,172 ERROR [stderr] (http-/127.0.0.1:8080-2) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [Server:server-one] 14:22:04,172 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [Server:server-one] 14:22:04,172 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [Server:server-one] 14:22:04,173 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [Server:server-one] 14:22:04,173 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [Server:server-one] 14:22:04,173 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [Server:server-one] 14:22:04,173 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [Server:server-one] 14:22:04,174 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [Server:server-one] 14:22:04,174 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [Server:server-one] 14:22:04,174 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [Server:server-one] 14:22:04,178 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [Server:server-one] 14:22:04,178 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [Server:server-one] 14:22:04,178 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [Server:server-one] 14:22:04,178 ERROR [stderr] (http-/127.0.0.1:8080-2) at java.lang.Thread.run(Thread.java:662) [Server:server-one] 14:22:04,179 ERROR [stderr] (http-/127.0.0.1:8080-2) Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/IntegrationDatasource [Server:server-one] 14:22:04,179 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:390) [Server:server-one] 14:22:04,179 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302) [Server:server-one] 14:22:04,180 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464) [Server:server-one] 14:22:04,180 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139) [Server:server-one] 14:22:04,180 ERROR [stderr] (http-/127.0.0.1:8080-2) ... 20 more [Server:server-one] 14:22:04,181 ERROR [stderr] (http-/127.0.0.1:8080-2) Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null [Server:server-one] 14:22:04,181 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:371) [Server:server-one] 14:22:04,181 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [Server:server-one] 14:22:04,181 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [Server:server-one] 14:22:04,182 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329) [Server:server-one] 14:22:04,182 ERROR [stderr] (http-/127.0.0.1:8080-2) ... 23 more [Server:server-one] 14:22:04,182 ERROR [stderr] (http-/127.0.0.1:8080-2) Caused by: javax.resource.ResourceException: Could not create connection [Server:server-one] 14:22:04,182 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277) [Server:server-one] 14:22:04,183 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235) [Server:server-one] 14:22:04,183 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761) [Server:server-one] 14:22:04,183 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343) [Server:server-one] 14:22:04,184 ERROR [stderr] (http-/127.0.0.1:8080-2) ... 26 more [Server:server-one] 14:22:04,184 ERROR [stderr] (http-/127.0.0.1:8080-2) Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) [Server:server-one] 14:22:04,184 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) [Server:server-one] 14:22:04,184 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096) [Server:server-one] 14:22:04,184 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028) [Server:server-one] 14:22:04,185 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:951) [Server:server-one] 14:22:04,185 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1717) [Server:server-one] 14:22:04,185 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276) [Server:server-one] 14:22:04,185 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2395) [Server:server-one] 14:22:04,186 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2428) [Server:server-one] 14:22:04,186 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2213) [Server:server-one] 14:22:04,186 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:797) [Server:server-one] 14:22:04,186 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) [Server:server-one] 14:22:04,187 ERROR [stderr] (http-/127.0.0.1:8080-2) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [Server:server-one] 14:22:04,187 ERROR [stderr] (http-/127.0.0.1:8080-2) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [Server:server-one] 14:22:04,187 ERROR [stderr] (http-/127.0.0.1:8080-2) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [Server:server-one] 14:22:04,187 ERROR [stderr] (http-/127.0.0.1:8080-2) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [Server:server-one] 14:22:04,188 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) [Server:server-one] 14:22:04,188 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389) [Server:server-one] 14:22:04,188 ERROR [stderr] (http-/127.0.0.1:8080-2) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) [Server:server-one] 14:22:04,188 ERROR [stderr] (http-/127.0.0.1:8080-2) at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249) [Server:server-one] 14:22:04,188 ERROR [stderr] (http-/127.0.0.1:8080-2) ... 29 more [Server:server-one] 14:22:04,189 ERROR [stderr] (http-/127.0.0.1:8080-2) error message After this long stream of messages I finally figure out I have a user problem: We need a validate JDBC Connection in the Console. A validation should automatically occur when I create/deploy the datasource, the fact that it is bound is not enough, we need to make sure it works. That way I can fix the connection if I am having any issues before I deploy my war file.

    JBoss Issue Tracker | 4 years ago | Jim Tyrrell
    javax.resource.ResourceException: Could not create connection
  2. 0

    Mysql Tomcat java.sql.SQLException - Spring Forum

    spring.io | 2 years ago
    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    java - Porque o código do Hibernate no Eclipse não se conecta a Base de Dados MySQL?

    com.br | 1 year ago
    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
  5. 0

    JDBC / MYSQL: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

    Stack Overflow | 5 years ago | user994165
    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

  1. jshakil 3 times, last 1 month ago
  2. jstrayer 6 times, last 3 months ago
  3. rp 1 times, last 5 months ago
  4. WoodenDoors 2 times, last 9 months ago
  5. tvrmsmith 1 times, last 6 months ago
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Access denied for user 'root'@'localhost' (using password: NO)

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    JDBC4Connection.<init>
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:951)
    5. com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1717)
    6. com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1276)
    7. com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2395)
    8. com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2428)
    9. com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2213)
    10. com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:797)
    11. com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    11 frames
  3. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[rt.jar:1.6.0_32]
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[rt.jar:1.6.0_32]
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[rt.jar:1.6.0_32]
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)[rt.jar:1.6.0_32]
    4 frames
  4. MySQL jdbc
    NonRegisteringDriver.connect
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    2. com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
    3. com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    3 frames
  5. IronJacamar
    LocalManagedConnectionFactory.createManagedConnection
    1. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
    2. org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)
    2 frames
  6. IronJacamar
    AbstractConnectionManager.allocateConnection
    1. org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
    2. org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
    3. org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
    4. org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
    5. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
    6. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:302)
    7. org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
    7 frames
  7. IronJacamar
    WrapperDataSource.getConnection
    1. org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:139)
    1 frame
  8. org.apache.jsp
    index_jsp._jspService
    1. org.apache.jsp.index_jsp._jspService(index_jsp.java:73)
    1 frame
  9. GWT dev
    HttpJspBase.service
    1. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)[jbossweb-7.0.16.Final-redhat-1.jar:]
    1 frame
  10. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:847)[jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
    1 frame
  11. GWT dev
    JspServlet.service
    1. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)[jbossweb-7.0.16.Final-redhat-1.jar:]
    2. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3 frames
  12. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:847)[jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
    1 frame
  13. Glassfish Core
    StandardContextValve.invoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)[jbossweb-7.0.16.Final-redhat-1.jar:]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)[jbossweb-7.0.16.Final-redhat-1.jar:]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)[jbossweb-7.0.16.Final-redhat-1.jar:]
    4 frames
  14. JBoss Web
    SecurityContextAssociationValve.invoke
    1. org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)[jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
    1 frame
  15. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)[jbossweb-7.0.16.Final-redhat-1.jar:]
    2. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)[jbossweb-7.0.16.Final-redhat-1.jar:]
    4. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)[jbossweb-7.0.16.Final-redhat-1.jar:]
    4 frames
  16. Grizzly HTTP
    JIoEndpoint$Worker.run
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)[jbossweb-7.0.16.Final-redhat-1.jar:]
    2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)[jbossweb-7.0.16.Final-redhat-1.jar:]
    3 frames
  17. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:662)[rt.jar:1.6.0_32]
    1 frame