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

Erro preparando o ambiente

Estou usando java8 e wildfly 10 mas apresenta erro, mesmo seguindo o procedimento.

insira seu código aqui

22:57:53,707 INFO [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 3) WELD-000119: Not generating any bean definitions from br.com.caelum.livraria.login.Autorizador because of underlying class loading error: Type PhaseEvent from [Module "deployment.livraria.war:main" from Service Module Loader] not found. If this is unexpected, enable DEBUG logging to see the full error. 22:57:55,281 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Inicializando Mojarra 2.2.13.SP1 20160303-1204 para o contexto '/livraria' 22:57:56,117 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Critical error during deployment: : com.sun.faces.config.ConfigurationException: Source Document: file:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent 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$1.call(DeploymentManagerImpl.java:200) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234) 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: PhaseEvent 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) ... 25 more Caused by: java.lang.ClassNotFoundException: PhaseEvent 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) ... 34 more

22:57:56,123 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:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent 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:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:236) 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:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent 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$1.call(DeploymentManagerImpl.java:200) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234) ... 8 more Caused by: com.sun.faces.config.ConfigurationException: Source Document: file:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent 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) ... 19 more Caused by: java.lang.NoClassDefFoundError: PhaseEvent 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) ... 25 more Caused by: java.lang.ClassNotFoundException: PhaseEvent 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) ... 34 more

22:57:56,146 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:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent Caused by: com.sun.faces.config.ConfigurationException: Source Document: file:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent Caused by: java.lang.NoClassDefFoundError: PhaseEvent Caused by: java.lang.ClassNotFoundException: PhaseEvent from [Module \"deployment.livraria.war:main\" from Service Module Loader]"}, "WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./livraria"], "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined } 22:57:56,212 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "livraria.war" (runtime-name : "livraria.war") 22:57:56,268 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:/D:/Alura/Java/EJB/wildfly-10.1.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: PhaseEvent

22:57:56,718 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 22:57:56,719 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 22:57:56,719 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 18072ms - Started 427 of 678 services (2 services failed or missing dependencies, 404 services are lazy, passive or on-demand) 22:57:57,059 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0028: Stopped deployment livraria.war (runtime-name: livraria.war) in 265ms 22:57:57,267 WARN [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address [] 22:57:57,271 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "livraria.war" (runtime-name: "livraria.war") 22:57:57,273 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.deployment.unit."livraria.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] service jboss.deployment.unit."livraria.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] service jboss.deployment.unit."livraria.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] service jboss.deployment.unit."livraria.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] service jboss.deployment.unit."livraria.war".component."org.jboss.weld.servlet.WeldTerminalListener".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

22:58:01,686 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

3 respostas

Apresenta erro ao importar:

import javax.enterprise.inject.Model; import javax.el.ELContext; import javax.el.ELResolver; import javax.faces.application.NavigationHandler; import javax.faces.context.FacesContext; import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseId; import javax.faces.event.PhaseListener;

solução!

Boa noite Ricardo, se voce tirar o projeto do Wildfly, ele sobre e voê consegue acessar o localhost?

Obrigado Guilherme, eu tirei o projeto do Wildfly tentei deu erro e depois adicionei novamente e ai funcionou.