Olá, estou estudando JSF e percebi que quando adiciono o primefaces na pasta WEB-INF / lib, meu comando para de funcionar e da um erro, mas se eu removo o primefaces, meu comando volta a funciona normamente.
Logo abaixo vou postar o código e o erro que esta dando. Se alguém ja passou por isto e puder me ajudar agradeço!
//meu codigo nao tem nada apenas adicionei as bibliotecas
<?xml version="1.0" encoding="ISO-8859-1" ?> Insert title here// Erro que da quando adiciono o primefaces
jan 17, 2018 8:00:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property ‘source’ to ‘org.eclipse.jst.jee.server:Drogaria’ did not find a matching property.
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version: Apache Tomcat/8.5.24
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built: Nov 27 2017 13:05:30 UTC
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number: 8.5.24.0
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name: Windows 10
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version: 10.0
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture: amd64
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home: C:\Program Files\Java\jre1.8.0_151
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version: 1.8.0_151-b12
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor: Oracle Corporation
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE: D:\Eclipse.metadata.plugins\org.eclipse.wst.server.core\tmp0
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME: C:\apache-tomcat-8.5.24
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=D:\Eclipse.metadata.plugins\org.eclipse.wst.server.core\tmp0
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\apache-tomcat-8.5.24
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=D:\Eclipse.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\apache-tomcat-8.5.24\endorsed
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
jan 17, 2018 8:00:13 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_151\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_151/bin/server;C:/Program Files/Java/jre1.8.0_151/bin;C:/Program Files/Java/jre1.8.0_151/lib/amd64;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Users\fabia\AppData\Local\Microsoft\WindowsApps;;C:\Windows\System32;;.]
jan 17, 2018 8:00:13 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler [“http-nio-8080”]
jan 17, 2018 8:00:13 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
jan 17, 2018 8:00:13 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler [“ajp-nio-8009”]
jan 17, 2018 8:00:13 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
jan 17, 2018 8:00:13 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 673 ms
jan 17, 2018 8:00:13 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service [Catalina]
jan 17, 2018 8:00:13 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.5.24
jan 17, 2018 8:00:15 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
jan 17, 2018 8:00:17 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
jan 17, 2018 8:00:17 PM com.sun.faces.config.ConfigureListener contextInitialized
INFORMAÇÕES: Inicializando Mojarra 2.3.0 ( 20170310-1214 96269eb4d9262817eef167b254deeb33eba6c740) para o contexto ‘/Drogaria’
jan 17, 2018 8:00:18 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFORMAÇÕES: JSF1048: Anotações PostConstruct/PreDestroy presentes. Os métodos ManagedBeans marcados com essas anotações informarão as anotações processadas.
jan 17, 2018 8:00:18 PM com.sun.faces.config.ConfigureListener contextInitialized
GRAVE: Critical error during deployment:
java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.faces.util.Util.loadClass(Util.java:333)
at com.sun.faces.config.processor.ApplicationConfigProcessor.addSystemEventListener(ApplicationConfigProcessor.java:1040)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:370)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:138)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:246)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:443)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:237)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4743)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
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)
Caused by: java.lang.ClassNotFoundException: javax.enterprise.context.spi.Contextual
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
… 20 more
jan 17, 2018 8:00:18 PM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of class [com.sun.faces.config.ConfigureListener]
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:315)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4743)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
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)
Caused by: java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.faces.util.Util.loadClass(Util.java:333)
at com.sun.faces.config.processor.ApplicationConfigProcessor.addSystemEventListener(ApplicationConfigProcessor.java:1040)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:370)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:138)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:155)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:246)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:443)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:237)
… 9 more
Caused by: java.lang.ClassNotFoundException: javax.enterprise.context.spi.Contextual
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
… 20 more
jan 17, 2018 8:00:18 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more listeners failed to start. Full details will be found in the appropriate container log file
jan 17, 2018 8:00:18 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/Drogaria] startup failed due to previous errors
jan 17, 2018 8:00:18 PM com.sun.faces.config.ConfigureListener contextDestroyed
GRAVE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.faces.el.ELUtils.addEL3_0_Resolvers(ELUtils.java:334)
at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:258)
at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:484)
at com.sun.faces.application.ApplicationImpl.performOneTimeELInitialization(ApplicationImpl.java:1404)
at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:526)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:367)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
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)
jan 17, 2018 8:00:18 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler [“http-nio-8080”]
jan 17, 2018 8:00:18 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler [“ajp-nio-8009”]
jan 17, 2018 8:00:18 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 5080 ms
jan 17, 2018 8:00:23 PM org.apache.catalina.core.StandardServer await
INFORMAÇÕES: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
jan 17, 2018 8:00:23 PM org.apache.coyote.AbstractProtocol pause
INFORMAÇÕES: Pausing ProtocolHandler [“http-nio-8080”]
jan 17, 2018 8:00:24 PM org.apache.coyote.AbstractProtocol pause
INFORMAÇÕES: Pausing ProtocolHandler [“ajp-nio-8009”]
jan 17, 2018 8:00:24 PM org.apache.catalina.core.StandardService stopInternal
INFORMAÇÕES: Stopping service [Catalina]
jan 17, 2018 8:00:24 PM org.apache.coyote.AbstractProtocol stop
INFORMAÇÕES: Stopping ProtocolHandler [“http-nio-8080”]
jan 17, 2018 8:00:24 PM org.apache.coyote.AbstractProtocol stop
INFORMAÇÕES: Stopping ProtocolHandler [“ajp-nio-8009”]
jan 17, 2018 8:00:24 PM org.apache.coyote.AbstractProtocol destroy
INFORMAÇÕES: Destroying ProtocolHandler [“http-nio-8080”]
jan 17, 2018 8:00:24 PM org.apache.coyote.AbstractProtocol destroy
INFORMAÇÕES: Destroying ProtocolHandler [“ajp-nio-8009”]