Forum Stats

  • 3,815,470 Users
  • 2,259,032 Discussions
  • 7,893,112 Comments

Discussions

They help me with this error with Eclipse Mars + Tomcat 8 + JSF + PrimeFaces + OmniFaces?

gechenique
gechenique Member Posts: 14 Blue Ribbon
edited Sep 2, 2015 8:31AM in JavaServer Faces

Hello forum friends!

I am following a tutorial JSF, and coming when generating the page of a sales order, I get the following error in Tomcat:

ago 28, 2015 1:48:19 PM org.apache.tomcat.util.digester.SetPropertiesRule begin

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:PrimeFacesVenta6' did not find a matching property.

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Server version:        Apache Tomcat/8.0.24

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Server built:          Jul 1 2015 20:19:55 UTC

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Server number:         8.0.24.0

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: OS Name:               Windows Server 2008 R2

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: OS Version:            6.1

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Architecture:          x86

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Java Home:             C:\Java-JRE-32

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: JVM Version:           1.7.0_72-b14

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: JVM Vendor:            Oracle Corporation

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_BASE:         E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: CATALINA_HOME:         C:\Tomcat

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Command line argument: -Dcatalina.base=E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Command line argument: -Dcatalina.home=C:\Tomcat

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Command line argument: -Dwtp.deploy=E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Command line argument: -Djava.endorsed.dirs=C:\Tomcat\endorsed

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.VersionLoggerListener log

INFO: Command line argument: -Dfile.encoding=Cp1252

ago 28, 2015 1:48:19 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java-JRE-32\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Java-JRE-32/bin/client;C:/Java-JRE-32/bin;C:/Java-JRE-32/lib/i386;C:\Program Files (x86)\Common Files\Crystal Decisions\2.0\bin\NOTES\;C:\Program Files (x86)\Common Files\Crystal Decisions\2.0\bin\NOTES\DATA\;C:\Program Files\ibm\gsk8\lib64;C:\Program Files\ibm\gsk8\bin;C:\Informix-SDK-410\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\informix\bin;C:\jrex64\bin;C:\jdkx64\bin;C:\Program Files (x86)\MySQL\Connector.J 5.1\;C:\Program Files (x86)\ibm\gsk7\bin;C:\Program Files (x86)\ibm\gsk7\lib;C:\Gradle\bin;C:\JDBC-Informix\lib;C:\Users\gechenique\Downloads\xBaseJ\bin;C:\Program Files (x86)\Common Files\Bosch\VideoSDK;C:\Eclipse-Luna;;.

ago 28, 2015 1:48:19 PM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["http-nio-8080"]

ago 28, 2015 1:48:19 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

INFO: Using a shared selector for servlet write/read

ago 28, 2015 1:48:19 PM org.apache.coyote.AbstractProtocol init

INFO: Initializing ProtocolHandler ["ajp-nio-8009"]

ago 28, 2015 1:48:19 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

INFO: Using a shared selector for servlet write/read

ago 28, 2015 1:48:19 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 780 ms

ago 28, 2015 1:48:19 PM org.apache.catalina.core.StandardService startInternal

INFO: Starting service Catalina

ago 28, 2015 1:48:19 PM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet Engine: Apache Tomcat/8.0.24

ago 28, 2015 1:48:20 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom

INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [121] milliseconds.

ago 28, 2015 1:48:22 PM org.apache.jasper.servlet.TldScanner scanJars

INFO: 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.

ago 28, 2015 1:48:22 PM org.omnifaces.ApplicationInitializer logOmniFacesVersion

INFO: Using OmniFaces version 2.1

ago 28, 2015 1:48:22 PM com.sun.faces.config.ConfigureListener contextInitialized

INFO: Initializing Mojarra 2.2.9 (-SNAPSHOT 20141218-0939 https://svn.java.net/svn/mojarra~svn/tags/[email protected]) for context '/PrimeFacesVenta6'

ago 28, 2015 1:48:23 PM com.sun.faces.spi.InjectionProviderFactory createInstance

INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

ago 28, 2015 1:48:23 PM com.sun.faces.config.ConfigureListener contextInitialized

SEVERE: Critical error during deployment:

java.lang.ExceptionInInitializerError

  at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)

  at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)

  at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)

  at com.sun.faces.application.InjectionApplicationFactory.getApplication(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(Unknown Source)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

  at java.lang.reflect.Constructor.newInstance(Unknown Source)

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

  at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(Unknown Source)

  at javax.faces.FactoryFinderInstance.getImplementationInstance(Unknown Source)

  at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)

  at javax.faces.FactoryFinder.getFactory(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)

  at com.sun.faces.config.ConfigManager.initialize(Unknown Source)

  at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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.IllegalStateException: CDI API is not available in this environment.

  at org.omnifaces.config.BeanManager.<init>(BeanManager.java:88)

  at org.omnifaces.config.BeanManager.<clinit>(BeanManager.java:49)

  ... 28 more

Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager

  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)

  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)

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

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

  at org.omnifaces.config.BeanManager.<init>(BeanManager.java:82)

  ... 29 more

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener

java.lang.RuntimeException: java.lang.ExceptionInInitializerError

  at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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.ExceptionInInitializerError

  at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)

  at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)

  at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)

  at com.sun.faces.application.InjectionApplicationFactory.getApplication(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(Unknown Source)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

  at java.lang.reflect.Constructor.newInstance(Unknown Source)

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

  at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(Unknown Source)

  at javax.faces.FactoryFinderInstance.getImplementationInstance(Unknown Source)

  at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)

  at javax.faces.FactoryFinder.getFactory(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)

  at com.sun.faces.config.ConfigManager.initialize(Unknown Source)

  ... 10 more

Caused by: java.lang.IllegalStateException: CDI API is not available in this environment.

  at org.omnifaces.config.BeanManager.<init>(BeanManager.java:88)

  at org.omnifaces.config.BeanManager.<clinit>(BeanManager.java:49)

  ... 28 more

Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager

  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)

  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)

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

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

  at org.omnifaces.config.BeanManager.<init>(BeanManager.java:82)

  ... 29 more

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class org.omnifaces.ApplicationListener

java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.BeanManager

  at org.omnifaces.ApplicationListener.checkCDIAvailable(ApplicationListener.java:63)

  at org.omnifaces.ApplicationListener.contextInitialized(ApplicationListener.java:55)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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)

ago 28, 2015 1:48:23 PM com.sun.faces.config.ConfigureListener contextInitialized

INFO: Initializing Mojarra 2.2.9 (-SNAPSHOT 20141218-0939 https://svn.java.net/svn/mojarra~svn/tags/[email protected]) for context '/PrimeFacesVenta6'

ago 28, 2015 1:48:23 PM com.sun.faces.spi.InjectionProviderFactory createInstance

INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

ago 28, 2015 1:48:23 PM com.sun.faces.config.ConfigureListener contextInitialized

SEVERE: Critical error during deployment:

java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.BeanManager

  at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)

  at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)

  at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)

  at com.sun.faces.application.InjectionApplicationFactory.getApplication(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(Unknown Source)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

  at java.lang.reflect.Constructor.newInstance(Unknown Source)

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

  at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(Unknown Source)

  at javax.faces.FactoryFinderInstance.getImplementationInstance(Unknown Source)

  at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)

  at javax.faces.FactoryFinder.getFactory(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)

  at com.sun.faces.config.ConfigManager.initialize(Unknown Source)

  at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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)

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext listenerStart

SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener

java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.BeanManager

  at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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: Could not initialize class org.omnifaces.config.BeanManager

  at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)

  at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)

  at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)

  at com.sun.faces.application.InjectionApplicationFactory.getApplication(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(Unknown Source)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

  at java.lang.reflect.Constructor.newInstance(Unknown Source)

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

  at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(Unknown Source)

  at javax.faces.FactoryFinderInstance.getImplementationInstance(Unknown Source)

  at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)

  at javax.faces.FactoryFinder.getFactory(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(Unknown Source)

  at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)

  at com.sun.faces.config.ConfigManager.initialize(Unknown Source)

  ... 10 more

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext startInternal

SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext startInternal

SEVERE: Context [/PrimeFacesVenta6] startup failed due to previous errors

ago 28, 2015 1:48:23 PM org.apache.catalina.core.StandardContext listenerStop

SEVERE: Exception sending context destroyed event to listener instance of class com.sun.faces.config.ConfigureListener

java.lang.NoClassDefFoundError: Could not initialize class org.omnifaces.config.BeanManager

  at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)

  at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)

  at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)

  at com.sun.faces.application.InjectionApplicationFactory.getApplication(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.config.ConfigureListener.contextDestroyed(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774)

  at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)

  at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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)

ago 28, 2015 1:48:23 PM javax.faces.FactoryFinderInstance getFactory

SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.

ago 28, 2015 1:48:23 PM com.sun.faces.config.ConfigureListener contextDestroyed

SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime

java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.

  at javax.faces.FactoryFinderInstance.getFactory(Unknown Source)

  at javax.faces.FactoryFinder.getFactory(Unknown Source)

  at com.sun.faces.config.InitFacesContext.getApplication(Unknown Source)

  at com.sun.faces.config.ConfigureListener.contextDestroyed(Unknown Source)

  at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4776)

  at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)

  at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)

  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)

ago 28, 2015 1:48:23 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["http-nio-8080"]

ago 28, 2015 1:48:23 PM org.apache.coyote.AbstractProtocol start

INFO: Starting ProtocolHandler ["ajp-nio-8009"]

ago 28, 2015 1:48:23 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 4262 ms

These errors were installed after Omnifaces to send an object to a bean.

The page code that throws the error is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"

  xmlns:ui="http://xmlns.jcp.org/jsf/facelets"

  xmlns:f="http://xmlns.jcp.org/jsf/core"

  xmlns:h="http://xmlns.jcp.org/jsf/html"

  xmlns:p="http://primefaces.org/ui">

<h:head>

  <title><ui:insert name="title">Default title</ui:insert></title>

</h:head>

<h:body>

    <ui:composition template="./WEB-INF/templates/plantilla.xhtml">

  

    <ui:define name="content" >

 

    <f:event type="preRenderView" listener="#{personaBean.listar('F')}" />

    <f:event type="preRenderView" listener="#{productoBean.listar('F')}" />

    <h:form>

    <p:outputLabel value="Persona">

    </p:outputLabel>

    <p:selectOneMenu value="#{ventaBean.venta.persona}" converter="omnifaces.SelectItemsConverter">

    <f:selectItem noSelectionOption="true" itemLabel="Seleccione" itemValue="#{null}" />

    <f:selectItems value="#{personaBean.lstPersonas}" var="per" itemLabel="#{per.nombre}" itemValue="#{per}" />

    </p:selectOneMenu>

 

    <p:outputLabel value="Producto">

    </p:outputLabel>

    <p:selectOneMenu value="#{ventaBean.producto}" converter="omnifaces.SelectItemsConverter">

    <f:selectItem noSelectionOption="true" itemLabel="Seleccione" itemValue="#{null}" />

    <f:selectItems value="#{productoBean.lstProductos}" var="pro" itemLabel="#{pro.nombre}" itemValue="#{pro}" />

    </p:selectOneMenu>

 

    <p:outputLabel value="Precio">

    </p:outputLabel>

    <p:inputText value="#{ventaBean.cantidad}" />

 

    <p:commandButton value="Agregar" actionListener="#{ventaBean.agregar()}" update="detalle"/>

 

    <p:dataTable id="detalle" value="#{ventaBean.lista}" var="det">

 

    <p:column headerText="Nombre Producto">

    #{det.producto.nombre}

    </p:column>

 

    <p:column headerText="Precio">

    #{det.producto.precio}

    </p:column>

 

    <p:column headerText="Cantidad">

    #{det.cantidad}

    </p:column>

    </p:dataTable>

 

    <p:commandButton value="Registrar Venta" />

 

    </h:form>

 

    </ui:define>

 

    </ui:composition>

</h:body>

</html>

El código del bean es el siguiente:

package com.mitocode.bean;

import java.util.ArrayList;

import java.util.List;

import javax.faces.bean.ManagedBean;

import javax.faces.view.ViewScoped;

import com.mitocode.model.DetalleVenta;

import com.mitocode.model.Producto;

import com.mitocode.model.Venta;

@ManagedBean

@ViewScoped

public class VentaBean {

  private Venta venta = new Venta();

  private Producto producto = new Producto();

  private int cantidad;

  private List<DetalleVenta> lista = new ArrayList<DetalleVenta>();

  public List<DetalleVenta> getLista() {

  return lista;

  }

  public void setLista(List<DetalleVenta> lista) {

  this.lista = lista;

  }

  public int getCantidad() {

  return cantidad;

  }

  public void setCantidad(int cantidad) {

  this.cantidad = cantidad;

  }

  public Producto getProducto() {

  return producto;

  }

  public void setProducto(Producto producto) {

  this.producto = producto;

  }

  public Venta getVenta() {

  return venta;

  }

  public void setVenta(Venta venta) {

  this.venta = venta;

  }

  public void agregar(){

  DetalleVenta det = new DetalleVenta();

  det.setCantidad(cantidad);

  det.setProducto(producto);

  this.lista.add(det);

  }

}

I searched Google as could be, but no solution fits my problem.

Maven already added to the CDI module, as recommended in StackOverflow, which makes the page is rendered, but when any button active, appears a 404 page.

Maven also added to the "welder" module.

What strikes me is that in the tutorial the  CDI and  "welder" modules are not added.

My work environment is as follows:

Mars Eclipse (4.5)

Mojarra 2.2.9

5.2 PrimeFaces

OmniFaces 2.1

Tomcat 8

I hope you can help me with this.

Thank you very much in advance.

Mensaje editado por: gechenique

tomfoulk

Best Answer

Answers

This discussion has been closed.