Pessoal, se alguém entender o que acontece, segue a lista de problema do erro 500.
Alguém sabe o que acontece ?
Root Cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.caelum.contas.dao.ContaDAO br.com.caelum.contas.controller.ContaController.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaDAO' defined in file [C:\Users\Marcio\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\contas\WEB-INF\classes\br\com\caelum\contas\dao\ContaDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.contas.dao.ContaDAO]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
O Codigo esta clean e funcionando e quando starto do servidor aparece esse erro acima
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.caelum.contas.dao.ContaDAO br.com.caelum.contas.controller.ContaController.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaDAO' defined in file [C:\Users\Marcio\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\contas\WEB-INF\classes\br\com\caelum\contas\dao\ContaDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.contas.dao.ContaDAO]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
org.springframework.beans.factory.BeanCreationException: Could not autowire field: private br.com.caelum.contas.dao.ContaDAO br.com.caelum.contas.controller.ContaController.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaDAO' defined in file [C:\Users\Marcio\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\contas\WEB-INF\classes\br\com\caelum\contas\dao\ContaDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.contas.dao.ContaDAO]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contaDAO' defined in file [C:\Users\Marcio\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\contas\WEB-INF\classes\br\com\caelum\contas\dao\ContaDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.contas.dao.ContaDAO]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.contas.dao.ContaDAO]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
Root Cause
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Root Cause
java.net.ConnectException: Connection refused: connect
Darlan, esse projeto é do Curso de Spring FrameWork da Alura , ele não veio completo na explicação com a conexão ao banco de dados, ou então as configurações ao MySql que fiz estavam erradas, então decidir pegar outro projeto pra dar uma estudada mais completo, nesse link aqui nesse blog tem um projeto de ponta a ponta com Spring FrameWork: Criando uma aplicação com Spring MVC, AngularJS, JPA e Wildfly
mostra o código da sua classe contaDAO, me parece que você está fazendo um @autoWired de um bean, no caso esse bean não está sendo gerenciado pelo spring, por isso ele não encontra.