0

I am trying to use OmniFaces for converters. However it will not initialize. I am running eclipse on Ubuntu. I have not implemented any converters or any other OmniFaces code in the project yet. But the intention is to use list converters and possibly other converters with PrimeFaces.

<!-- o:converter converterId="omnifaces.ListConverter" list="#{backingLeague.listLeague.source}" /  -->

Stack trace

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(ConfigureListener.java:292)
    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:1409)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
    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)
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(InjectionApplicationFactory.java:93)
    at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:144)
    at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:62)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:402)
    at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:248)
    at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:529)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:275)
    at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
    ... 9 more

Dependency

<dependency>
    <groupId>org.omnifaces</groupId>
    <artifactId>omnifaces</artifactId>
    <version>2.1</version>
</dependency>

Page include

<h:html lang="sv-SE" 
    xmlns="http://www.w3c.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:o="http://omnifaces.org/ui"
    xmlns:of="http://omnifaces.org/functions">
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
user2130951
  • 2,291
  • 4
  • 21
  • 49
  • Please share the bottommost root cause of the exception. Any exception which comes thereafter are just consequences and unhelpful in understanding the root cause. – BalusC Sep 03 '15 at 11:19
  • There is nothing more in the stacktrace – user2130951 Sep 03 '15 at 11:24
  • Then read futher back in the log. My educated guess is that you didn't install CDI on Tomcat which would cause `Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager`. – BalusC Sep 03 '15 at 11:27
  • Added into the question – user2130951 Sep 03 '15 at 11:28
  • http://stackoverflow.com/questions/31899406/omnifaces-exception-on-deployment-on-tomcat-7 – user2130951 Sep 03 '15 at 11:36
  • Please don't chameleonize existing questions to ask about a completely different problem. Now your whole question is bloated and confusing because you're keeping and mixing the old (and already long solved) question. – BalusC Sep 03 '15 at 11:53
  • From reading other questions about this. This new error can happen because of running two JSF versions. But I do not have two versions to my knowledge I am only running mojarra. – user2130951 Sep 03 '15 at 11:56

0 Answers0