myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-4224) AnnotatedFlowConfigurator.configureAnnotatedFlows is broken
Date Thu, 12 Apr 2018 21:46:00 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436349#comment-16436349
] 

Mark Struberg edited comment on MYFACES-4224 at 4/12/18 9:45 PM:
-----------------------------------------------------------------

It didn't stop there :(

{noformat}
SCHWERWIEGEND: An error occured while initializing MyFaces: It's not allowed to call getBeans(Type,
Annotation...) before AfterBeanDiscovery
java.lang.IllegalStateException: It's not allowed to call getBeans(Type, Annotation...) before
AfterBeanDiscovery
	at org.apache.webbeans.container.InjectableBeanManager.checkAfterBeanDiscoveryProcessed(InjectableBeanManager.java:423)
	at org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:129)
	at org.apache.myfaces.cdi.util.CDIUtils.lookup(CDIUtils.java:45)
	at org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.<init>(CDIManagedBeanHandlerImpl.java:54)
	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:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:429)
	at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:392)
	at org.apache.myfaces.spi.impl.DefaultViewScopeProviderFactory.getViewScopeHandler(DefaultViewScopeProviderFactory.java:49)
	at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:177)
	at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
{noformat}


was (Author: struberg):
It didn't stop there :(

{noscript}
SCHWERWIEGEND: An error occured while initializing MyFaces: It's not allowed to call getBeans(Type,
Annotation...) before AfterBeanDiscovery
java.lang.IllegalStateException: It's not allowed to call getBeans(Type, Annotation...) before
AfterBeanDiscovery
	at org.apache.webbeans.container.InjectableBeanManager.checkAfterBeanDiscoveryProcessed(InjectableBeanManager.java:423)
	at org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:129)
	at org.apache.myfaces.cdi.util.CDIUtils.lookup(CDIUtils.java:45)
	at org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.<init>(CDIManagedBeanHandlerImpl.java:54)
	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:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:429)
	at org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:392)
	at org.apache.myfaces.spi.impl.DefaultViewScopeProviderFactory.getViewScopeHandler(DefaultViewScopeProviderFactory.java:49)
	at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:177)
	at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
{noscript}

> AnnotatedFlowConfigurator.configureAnnotatedFlows is broken
> -----------------------------------------------------------
>
>                 Key: MYFACES-4224
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4224
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-372
>    Affects Versions: 2.2.12, 2.3.0
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>            Priority: Major
>
> When running MyFaces on Tomcat with any CDI container AnnotatedFlowConfigurator.configureAnnotatedFlows
get's called way too early which leads to the following Exception:
> {noformat}
> Apr 12, 2018 4:00:55 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
> SCHWERWIEGEND: An error occured while initializing MyFaces: It's not allowed to call
getBeans(Type, Annotation...) before AfterBeanDiscovery
> java.lang.IllegalStateException: It's not allowed to call getBeans(Type, Annotation...)
before AfterBeanDiscovery
> 	at org.apache.webbeans.container.InjectableBeanManager.checkAfterBeanDiscoveryProcessed(InjectableBeanManager.java:423)
> 	at org.apache.webbeans.container.InjectableBeanManager.getBeans(InjectableBeanManager.java:129)
> 	at org.apache.myfaces.cdi.util.CDIUtils.lookup(CDIUtils.java:45)
> 	at org.apache.myfaces.flow.cdi.DefaultCDIFacesFlowProvider.getAnnotatedFlows(DefaultCDIFacesFlowProvider.java:52)
> 	at org.apache.myfaces.flow.impl.AnnotatedFlowConfigurator.configureAnnotatedFlows(AnnotatedFlowConfigurator.java:42)
> 	at org.apache.myfaces.config.FacesConfigurator.configureFlowHandler(FacesConfigurator.java:1672)
> 	at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:614)
> 	at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:416)
> 	at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:74)
> 	at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:172)
> 	at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:121)
> 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
> 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	at java.lang.Thread.run(Thread.java:748)
> {noformat}
> This happens because the CDI spec disallows to call BeanManager#getBeans() before the
container is started (AfterDeploymentValidation and later)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message