3
respostas

jboss não sobe wildfly 11

11:52:13,841 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-6) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final 11:52:13,841 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) 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:172) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0041: Component class br.com.caelum.livraria.dao.AutorDao for component AutorDao 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:165) ... 5 more

11:52:14,281 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started client-mappings cache from ejb container 11:52:14,391 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" => "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.AutorDao for component AutorDao 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"], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.deployment.unit.\"livraria.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"livraria.war\".beanmanager]", "jboss.deployment.unit.\"livraria.war\".batch.artifact.factory is missing [jboss.deployment.unit.\"livraria.war\".beanmanager]" ] } 11:52:14,422 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "livraria.war" (runtime-name : "livraria.war") 11:52:14,437 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.deployment.unit."livraria.war".beanmanager (missing) dependents: [service jboss.deployment.unit."livraria.war".batch.artifact.factory, service jboss.deployment.unit."livraria.war".weld.weldClassIntrospector] WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."livraria.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "livraria.war"

3 respostas

Olá Bruno,

Por acaso você está utilizando a anotação @PersistenceUnit ou @PersistenceContext no seu código?

Você chegou a criar algum datasource no wildfly?

@PersistenceContext, usei na classe AutorDao, package br.com.caelum.livraria.dao;

package br.com.caelum.livraria.dao;

import java.util.List;

import javax.annotation.PostConstruct; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext;

import br.com.caelum.livraria.modelo.Autor;

@Stateless public class AutorDao {

@PersistenceContext private EntityManager manager;

@PostConstruct void aposCriacao() { System.out.println("Autor foi criado");

}

public void salva(Autor autor) {

System.out.println("Salvando autor " + autor.getNome());

/ try { Thread.sleep(20000); } catch (InterruptedException e) { // TODO: handle exception e.printStackTrace(); }/

manager.persist(autor);

System.out.println("salvou autor "); }

public List todosAutores() { return manager.createQuery("select a from Autor a", Autor.class).getResultList(); }

public Autor buscaPelaId(Integer autorId) { Autor autor = this.manager.find(Autor.class, autorId); return autor; }

}

data source explorer criei conexa com o mysql pra testar

Tenta colocar o nome da sua PersistenceUnit na anotação conforme o exemplo abaixo:

@PersistenceContext(name="PersistentUnitName")