使用OpenWebbeans启动时出现Omnifaces 2.0错误

时间:2015-04-25 15:38:53

标签: jsf-2 tomcat7 omnifaces openwebbeans

我使用TomCat7上的Primefaces将现有的JSF应用程序转换为使用CDI和Omnifaces 2.0。我以前在webapp中使用过以前版本的Omnifaces。

TomEE不是一个选项,经过多次尝试与Weld,我开始使用OpenWebbeans。但是我在服务器启动时收到错误。 对此有何帮助?

我的配置(JSF 2.2.8):

的pom.xml
注意:添加openwebbeans-jsf没有解决任何问题

    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-atinject_1.0_spec</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-jcdi_1.1_spec</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-interceptor_1.2_spec</artifactId>
        <version>1.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-annotation_1.2_spec</artifactId>
        <version>1.0</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.openwebbeans</groupId>
        <artifactId>openwebbeans-spi</artifactId>
        <version>1.5.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.openwebbeans</groupId>
        <artifactId>openwebbeans-impl</artifactId>
        <version>1.5.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.openwebbeans</groupId>
        <artifactId>openwebbeans-web</artifactId>
        <version>1.5.0</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.openwebbeans</groupId>
        <artifactId>openwebbeans-tomcat7</artifactId>
        <version>1.5.0</version>
        <scope>compile</scope>
    </dependency>

context.xml

<Context>
    <Resource name="BeanManager" 
        auth="Container"
        type="javax.enterprise.inject.spi.BeanManager"
        factory="org.apache.webbeans.container.ManagerObjectFactory" />
</Context>

我收到以下错误:

apr 25, 2015 4:50:34 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.omnifaces.ApplicationListener
java.lang.NullPointerException
    at org.omnifaces.ApplicationListener.contextInitialized(ApplicationListener.java:55)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    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)

apr 25, 2015 4:50:34 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.2.8 ( 20140814-1418 https://svn.java.net/svn/mojarra~svn/tags/2.2.8@13507) for context '/admin'
apr 25, 2015 4:50:34 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
apr 25, 2015 4:50:35 PM com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment: 
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
    at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:330)
    at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4990)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    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: javax.faces.FacesException: com.sun.faces.lifecycle.ClientWindowFactoryImpl
    at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:417)
    at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:248)
    at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:488)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:287)
    at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
    ... 12 more
Caused by: java.lang.UnsupportedOperationException: java.lang.reflect.InvocationTargetException
    at org.omnifaces.config.BeanManager.getReference(BeanManager.java:154)
    at org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)
    at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:88)
    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(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(FactoryFinderInstance.java:415)
    ... 16 more
Caused by: java.lang.reflect.InvocationTargetException
    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 org.omnifaces.config.BeanManager.getReference(BeanManager.java:143)
    ... 28 more
Caused by: java.lang.IllegalStateException: It's not allowed to call getBeans(Type, Annotation...) before AfterBeanDiscovery
    at org.apache.webbeans.container.InjectableBeanManager.checkAfterBeanDiscoveryProcessed(InjectableBeanManager.java:402)
    at org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:121)
    ... 33 more

[编辑]
我跟着关于Weld安装的博客。我之前从Weld添加了SP1,但是我现在重试了Final版本来捕获必要的痕迹 只需添加weld-servlet依赖项就可以得到以下stacktrace:

25 apr 2015 21:37:10  INFO servletWeldServlet - WELD-ENV-001008: Initialize Weld using ServletContainerInitializer
25 apr 2015 21:37:11  INFO Version - WELD-000900: 2.2.10 (Final)
25 apr 2015 21:37:11  INFO Bootstrap - WELD-ENV-000020: Using jandex for bean discovery
25 apr 2015 21:37:13  INFO Bootstrap - WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
25 apr 2015 21:37:14  WARN Interceptor - WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
25 apr 2015 21:37:14  WARN Interceptor - WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
25 apr 2015 21:37:15  WARN Event - WELD-000411: Observer method [BackedAnnotatedMethod] public org.omnifaces.VetoAnnotatedTypeExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
apr 25, 2015 9:37:15 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/admin]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/admin]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 6 more
Caused by: org.jboss.weld.exceptions.DeploymentException: org.jboss.jandex.ClassInfo.hasNoArgsConstructor()Z
    at org.jboss.weld.executor.AbstractExecutorServices.checkForExceptions(AbstractExecutorServices.java:66)
    at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:43)
    at org.jboss.weld.executor.AbstractExecutorServices.invokeAllAndCheckForExceptions(AbstractExecutorServices.java:51)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer.addClasses(ConcurrentBeanDeployer.java:62)
    at org.jboss.weld.bootstrap.BeanDeployment.createClasses(BeanDeployment.java:203)
    at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:372)
    at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76)
    at org.jboss.weld.environment.servlet.WeldServletLifecycle.initialize(WeldServletLifecycle.java:141)
    at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:61)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5479)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: java.lang.NoSuchMethodError: org.jboss.jandex.ClassInfo.hasNoArgsConstructor()Z
    at org.jboss.weld.environment.deployment.discovery.jandex.JandexClassFileInfo.<init>(JandexClassFileInfo.java:65)
    at org.jboss.weld.environment.deployment.discovery.jandex.JandexClassFileServices.getClassFileInfo(JandexClassFileServices.java:82)
    at org.jboss.weld.bootstrap.FastAnnotatedTypeLoader.loadAnnotatedType(FastAnnotatedTypeLoader.java:61)
    at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:65)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$1.doWork(ConcurrentBeanDeployer.java:62)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    ... 4 more

之前我遇到过这个错误,我不得不将Jandex添加到类路径,版本1.2.4.Final

添加此库似乎(似乎)就像服务器和应用程序正确启动一样,但它不是。我从未得到#34;应用程序启动&#34;信息。 我在Windows 7上通过Eclipse localhost运行TomCat,也在Mac上试过但行为相同。 Eclipse永远不会停止显示消息&#34;启动Tomcat v7.0 ......&#34;。 看看threaddump并没有向我学习任何东西:

c:\Program Files\Java\jdk1.7.0_67\bin>jstack -l 4476
2015-04-25 22:11:41
Full thread dump Java HotSpot(TM) Client VM (24.65-b04 mixed mode):

"Hikari Housekeeping Timer (pool HikariPool-0)" daemon prio=6 tid=0x4e5dd000 nid=0x126c waiting on condition [0x5013f000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x1bc5aed0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.getTask(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)

   Locked ownable synchronizers:
        - None

"Abandoned connection cleanup thread" daemon prio=6 tid=0x4f205400 nid=0x119c in Object.wait() [0x4e48f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x1bbe5af8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x1bbe5af8> (a java.lang.ref.ReferenceQueue$Lock)
        at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:41)

   Locked ownable synchronizers:
        - None

"weld-worker-1" daemon prio=6 tid=0x4eb2f800 nid=0x11bc waiting on condition [0x4ed9f000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x1b5a8570> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.getTask(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)

   Locked ownable synchronizers:
        - None

    "localhost-startStop-1" daemon prio=6 tid=0x4e1b2400 nid=0xb18 runnable [0x03dce000]
    java.lang.Thread.State: RUNNABLE
        at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:84)
        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(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(FactoryFinderInstance.java:415)
        at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:248)
        at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:488)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:287)
        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:435)
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4990)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
        - locked <0x1953f410> (a org.apache.catalina.core.StandardContext)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x1953f410> (a org.apache.catalina.core.StandardContext)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
        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)

    Locked ownable synchronizers:
        - <0x0601e4e8> (a java.util.concurrent.locks.ReentrantReadWriteLock$FairSync)
        - <0x195beea8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Catalina-startStop-1" daemon prio=6 tid=0x4e1b1c00 nid=0x4c4 waiting on condition [0x4e4ff000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x195e0380> (a java.util.concurrent.FutureTask)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.FutureTask.awaitDone(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        - locked <0x1951a790> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
        - locked <0x1951a790> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x1951a790> (a org.apache.catalina.core.StandardHost)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
        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)

   Locked ownable synchronizers:
        - <0x195bf000> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"GC Daemon" daemon prio=2 tid=0x4e15bc00 nid=0xc90 in Object.wait() [0x4e42f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x19570e38> (a sun.misc.GC$LatencyLock)
        at sun.misc.GC$Daemon.run(Unknown Source)
        - locked <0x19570e38> (a sun.misc.GC$LatencyLock)

   Locked ownable synchronizers:
        - None

"Service Thread" daemon prio=6 tid=0x00dcc800 nid=0x7e0 runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"C1 CompilerThread0" daemon prio=10 tid=0x00dbf000 nid=0x1248 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Attach Listener" daemon prio=10 tid=0x00dbdc00 nid=0x7b0 waiting on condition [0x00000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Signal Dispatcher" daemon prio=10 tid=0x0070e400 nid=0x980 runnable [0x00000000]
   java.lang.Thread.State: RUNNABLE

   Locked ownable synchronizers:
        - None

"Finalizer" daemon prio=8 tid=0x00d93c00 nid=0x11c0 in Object.wait() [0x007ef000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x193c2cc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x193c2cc0> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

   Locked ownable synchronizers:
        - None

"Reference Handler" daemon prio=10 tid=0x0070c800 nid=0x1618 in Object.wait() [0x00d8f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x193c2d50> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:503)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
        - locked <0x193c2d50> (a java.lang.ref.Reference$Lock)

   Locked ownable synchronizers:
        - None

"main" prio=6 tid=0x00614800 nid=0x50c waiting on condition [0x0055f000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x195bef98> (a java.util.concurrent.FutureTask)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.FutureTask.awaitDone(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        - locked <0x194dbaf8> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
        - locked <0x194dbaf8> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x194dbaf8> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        - locked <0x194dbaf8> (a org.apache.catalina.core.StandardEngine)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x194c6188> (a org.apache.catalina.core.StandardService)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
        - locked <0x19542560> (a [Lorg.apache.catalina.Service;)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        - locked <0x19434bd0> (a org.apache.catalina.core.StandardServer)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
        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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)

   Locked ownable synchronizers:
        - None

"VM Thread" prio=10 tid=0x00709000 nid=0x160c runnable

"VM Periodic Task Thread" prio=10 tid=0x00de7400 nid=0x1460 waiting on condition

JNI global references: 221

1 个答案:

答案 0 :(得分:0)

这是Omnifaces中的非便携行为。 Bauke需要处理这段代码。 CDI规范没有说明必须在ServletContainerInitializer中提供CDI容器。因此,它无法以便携方式得到保证。它也无法在Google App Engine,码头等上运行......

我只是从Omnifaces删除该检查代码,您的应用程序将“正常工作”(tm)。这真是一个误报......