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

Preparando o ambiente

Olá,

Estou achando o erro abaixo quando tento preparar o ambiente. Estou usando o wildfly e java 8. Estranho que na aba Libraries aparece o erro JRE System Library [Java SE 7] (unbound). Tentei deletar essa library mas não resolveu.

A princípio acho que adicionei corretamente no Java Build Path o Wildfly Runtime.

Na aba Makers aparece os erros:

Target runtime JBoss 7.1 Runtime is not defined. livraria Unknown Faceted Project Problem Class br.com.caelum.livraria.login.Autorizador must extend the type javax.faces.event.PhaseListener faces-config.xml /livraria/WebContent/WEB-INF line 15 JSF Problem Unbound classpath container: 'JRE System Library [Java SE 7 [1.7.0_17]]' in project 'livraria' livraria Build path Build Path Problem Unknown Unknown Java Exception Breakpoint Unknown Unknown Java Exception Breakpoint The project cannot be built until build path errors are resolved livraria Unknown Java Problem

No console aparece os erros abaixo:

13:37:30,222 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 59) Critical error during deployment: : com.sun.faces.config.ConfigurationException: Source Document: file:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:378) 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(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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) at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:428) at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:301) ... 25 more Caused by: java.lang.ClassNotFoundException: br.com.caelum.livraria.login.Autorizador 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) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.sun.faces.util.Util.loadClass(Util.java:364) at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:420) ... 26 more

13:37:30,224 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 59) 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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) 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:378) 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: javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader] at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:428) at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:301) ... 25 more Caused by: java.lang.ClassNotFoundException: br.com.caelum.livraria.login.Autorizador 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) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.sun.faces.util.Util.loadClass(Util.java:364) at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:420) ... 26 more

13:37:30,229 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module \"deployment.livraria.war:main\" from Service Module Loader] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module \"deployment.livraria.war:main\" from Service Module Loader] Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: Source Document: file:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module \"deployment.livraria.war:main\" from Service Module Loader] Caused by: com.sun.faces.config.ConfigurationException: Source Document: file:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module \"deployment.livraria.war:main\" from Service Module Loader] Caused by: javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module \"deployment.livraria.war:main\" from Service Module Loader] Caused by: java.lang.ClassNotFoundException: br.com.caelum.livraria.login.Autorizador 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 } 13:37:30,254 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "livraria.war" (runtime-name : "livraria.war") 13:37:30,255 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:/var/www/html/java/EJB/1-IntroducaoAosEnterpriseJavaBeans/wildfly-10.1.0.CR1/standalone/deployments/livraria.war/WEB-INF/faces-config.xml Cause: Unable to create a new instance of 'br.com.caelum.livraria.login.Autorizador': javax.faces.FacesException: br.com.caelum.livraria.login.Autorizador from [Module "deployment.livraria.war:main" from Service Module Loader]

13:37:30,363 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 13:37:30,364 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 13:37:30,364 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.CR1 (WildFly Core 2.2.0.CR9) started (with errors) in 5016ms - Started 427 of 678 services (2 services failed or missing dependencies, 404 services are lazy, passive or on-demand) 13:37:30,426 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment livraria.war (runtime-name: livraria.war) in 45ms 13:37:30,464 WARN [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address [] 13:37:30,465 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0009: Undeployed "livraria.war" (runtime-name: "livraria.war") 13:37:30,466 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) 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.FacesServlet".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."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".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] service jboss.undertow.deployment.default-server.default-host./livraria (missing) dependents: [service jboss.deployment.unit."livraria.war".deploymentCompleteService] WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./livraria

13:37:35,277 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

Grato pela ajuda!

2 respostas
solução!

Opa Tiago, realmente parece que ambiente está desconfigurado. Em relação ao jre unbound, vc precisa fazer o seguinte:

  • Remover a library
    • Na própria aba libraries, vc clica em "Add Library"
    • Escolhe JRE System Library, Next
    • Agora você escolhe os runtimes que realmente existem na sua máquina

Em relação ao target runtime not found, é algo parecido. Faz assim:

  • Vai em propriedades do projeto
    • Project Facets
    • Tem uma aba que chama Runtimes
    • Deve estar selecionado um servidor errado...
    • Desmarca e adiciona o seu

Acho que isso pode ajudar

Muito obrigado amigo!

Gratidão :)