Erro ao dar deploy e consumir um EJB

0 respostas
Italo_Alves2

Quando tento dar deploy em um projeto web simples utilizando um projeto EJB para poder consumi-lo, eu recebo a seguinte stack de erro. Estou usando o eclipse 2019 com o plugin do Jboss instalado via marketplace, o servidor é o widfly 18 e o uso o JDK8.

12:04:18,306 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit.consumerCarrinhoWeb.war.POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit.consumerCarrinhoWeb.war.POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment consumerCarrinhoWeb.war

at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)

at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)

at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)

at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)

at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)

at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class br.com.servlet.ConsumerCarrinho with ClassLoader ModuleClassLoader for Module deployment.consumerCarrinhoWeb.war from Service Module Loader

at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)

at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)

at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)

at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)

at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)

at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)

 8 more

Caused by: java.lang.NoClassDefFoundError: Lbr/com/ejb/CarrinhoEJB;

at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)

at java.lang.Class.getDeclaredFields(Unknown Source)

at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.(ClassReflectionIndex.java:72)

at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)

 13 more

Caused by: java.lang.ClassNotFoundException: br.com.ejb.CarrinhoEJB from [Module deployment.consumerCarrinhoWeb.war from Service Module Loader]

at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)

at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)

at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)

 18 more

12:04:18,978 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0003: Processing weld deployment carrinhoEJB.jar
12:04:21,652 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-2) HV000001: Hibernate Validator 6.0.18.Final
12:04:23,442 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-2) WFLYEJB0473: JNDI bindings for session bean named ‘CarrinhoEJB’ in deployment unit ‘deployment “carrinhoEJB.jar”’ are as follows:

java:global/carrinhoEJB/CarrinhoEJB!br.com.ejb.CarrinhoEJB
java:app/carrinhoEJB/CarrinhoEJB!br.com.ejb.CarrinhoEJB
java:module/CarrinhoEJB!br.com.ejb.CarrinhoEJB
ejb:/carrinhoEJB/CarrinhoEJB!br.com.ejb.CarrinhoEJB?stateful
java:global/carrinhoEJB/CarrinhoEJB
java:app/carrinhoEJB/CarrinhoEJB
java:module/CarrinhoEJB
12:04:26,500 INFO  [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 3.1.2 (Final)

12:04:27,690 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-2) ISPN000128: Infinispan version: Infinispan Infinity Minus ONE +2 9.4.16.Final

12:04:31,679 INFO  [io.smallrye.metrics] (MSC service thread 1-3) MicroProfile: Metrics activated

12:04:33,480 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool  78) WFLYCLINF0002: Started client-mappings cache from ejb container

12:04:35,938 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (deploy) failed - address: ([(deployment => consumerCarrinhoWeb.war)]) - failure description: {WFLYCTL0080: Failed services => {jboss.deployment.unit.consumerCarrinhoWeb.war.POST_MODULE => WFLYSRV0153: Failed to process phase POST_MODULE of deployment consumerCarrinhoWeb.war

Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class br.com.servlet.ConsumerCarrinho with ClassLoader ModuleClassLoader for Module deployment.consumerCarrinhoWeb.war from Service Module Loader

Caused by: java.lang.NoClassDefFoundError: Lbr/com/ejb/CarrinhoEJB;

Caused by: java.lang.ClassNotFoundException: br.com.ejb.CarrinhoEJB from [Module deployment.consumerCarrinhoWeb.war from Service Module Loader]}}

12:04:36,484 INFO  [org.jboss.as.server] (ServerService Thread Pool  44) WFLYSRV0010: Deployed consumerCarrinhoWeb.war (runtime-name : consumerCarrinhoWeb.war)

12:04:36,486 INFO  [org.jboss.as.server] (ServerService Thread Pool  44) WFLYSRV0010: Deployed carrinhoEJB.jar (runtime-name : carrinhoEJB.jar)

12:04:36,495 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit.consumerCarrinhoWeb.war.POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment consumerCarrinhoWeb.war

12:04:37,153 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
12:04:37,160 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
12:04:37,161 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
12:04:37,163 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) started (with errors) in 60571ms - Started 461 of 683 services (1 services failed or missing dependencies, 375 services are lazy, passive or on-demand)

Criado 2 de março de 2020
Respostas 0
Participantes 1