Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Dúvida no Ex. 1 da Aula 1 - Introdução aos Enterprise Java Beans

Prezados, tenho o JRE 1.8 instalado em minha máquina. Assim, tive que baixar o JBOSS wildfly 10.

Inseri a library desse JBOSS no build path do projeto, e mesmo assim as classes não compilam. Além disso, ao subir o JBoss ocorrem as exceções abaixo.

Pergunta: os exemplos só rodam na versão do JBOSS AS 7, ou eu estou fazendo algo de errado?

16:22:03,602 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Inicializando Mojarra 2.2.12-jbossorg-2 20150729-1131 para o contexto '/livraria' 16:22:04,580 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Critical error during deployment: : com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:364) at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListeners(LifecycleConfigProcessor.java:154) at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:132) at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152) at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: java.lang.NoClassDefFoundError: PhaseId at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at com.sun.faces.util.Util.classHasAnnotations(Util.java:1044) at com.sun.faces.application.ApplicationInstanceFactoryMetadataMap.onPut(ApplicationInstanceFactoryMetadataMap.java:75) at com.sun.faces.application.ApplicationInstanceFactoryMetadataMap.onPut(ApplicationInstanceFactoryMetadataMap.java:43) at com.sun.faces.util.MetadataWrapperMap.put(MetadataWrapperMap.java:91) at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:422) at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:301) ... 16 more Caused by: java.lang.ClassNotFoundException: PhaseId from [Module "deployment.livraria.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) ... 25 more

16:22:04,585 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 61) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./livraria: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./livraria: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:231) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82) ... 6 more Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:198) ... 8 more Caused by: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:364) at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListeners(LifecycleConfigProcessor.java:154) at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:132) at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:152) at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:239) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227) ... 10 more Caused by: java.lang.NoClassDefFoundError: PhaseId at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at com.sun.faces.util.Util.classHasAnnotations(Util.java:1044) at com.sun.faces.application.ApplicationInstanceFactoryMetadataMap.onPut(ApplicationInstanceFactoryMetadataMap.java:75) at com.sun.faces.application.ApplicationInstanceFactoryMetadataMap.onPut(ApplicationInstanceFactoryMetadataMap.java:43) at com.sun.faces.util.MetadataWrapperMap.put(MetadataWrapperMap.java:91) at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:422) at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:301) ... 16 more Caused by: java.lang.ClassNotFoundException: PhaseId from [Module "deployment.livraria.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) ... 25 more

16:22:04,600 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "livraria.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./livraria" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./livraria: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId Caused by: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId Caused by: java.lang.NoClassDefFoundError: PhaseId Caused by: java.lang.ClassNotFoundException: PhaseId from [Module \"deployment.livraria.war:main\" from Service Module Loader]"}} 16:22:04,716 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "livraria.war" (runtime-name : "livraria.war") 16:22:04,723 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./livraria: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./livraria: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/C:/download/wildfly-10.0.0.Final/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Class 'br.com.caelum.livraria.login.Autorizador' is missing a runtime dependency: java.lang.NoClassDefFoundError: PhaseId

16:22:05,061 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 16:22:05,062 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 16:22:05,063 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 15323ms - Started 362 of 654 services (2 services failed or missing dependencies, 382 services are lazy, passive or on-demand) 16:22:05,168 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0010: Stopping weld service for deployment livraria.war 16:22:05,360 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment livraria.war (runtime-name: livraria.war) in 234ms 16:22:05,542 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "livraria.war" (runtime-name: "livraria.war") 16:22:05,544 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.deployment.unit."livraria.war".component."javax.faces.webapp.FacesServlet".START (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./livraria

16:22:09,793 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found livraria.war in deployment directory. To trigger deployment create a file called livraria.war.dodeploy

2 respostas
solução!

Ola, Gustavo Meneses !

Uma dúvida, chegou a fazer o teste com JBoss 7 ?

Abraço!

Acabei de conseguir configurar corretamente o build path. Funcionou, obrigado!