Ok Fabio obrigado já esta resolvido tem senha e não coloquei agora tudo tranquilo.
Mas agora estou com um problema na classe LivroDao, pois esta dizendo que esta com erro de persistência segue o codigo da classe.
@PersistenceContext
private EntityManager manager;
public void salva(Livro livro) {
manager.persist(livro);
}
public List<Livro> todosLivros() {
return manager.createQuery("select l from Livro l", Livro.class).getResultList();
}
}
Erro no Console.
16:55:21,673 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."livraria.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."livraria.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "livraria.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class br.com.caelum.livraria.dao.LivroDao for component LivroDao has errors:
WFLYJPA0033: Can't find a persistence unit named null in deployment "livraria.war"
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:157)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:186)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:143)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
16:55:21,682 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "livraria.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"livraria.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"livraria.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"livraria.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class br.com.caelum.livraria.dao.LivroDao for component LivroDao has errors:
WFLYJPA0033: Can't find a persistence unit named null in deployment \"livraria.war\""},
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.deployment.unit.\"livraria.war\".beanmanager",
"jboss.deployment.unit.\"livraria.war\".INSTALL"