I got the same problem when calling the following code
> FacesContext.getCurrentInstance().getViewRoot().getViewMap().put(key, bean);
The full log:
> com.google.inject.ProvisionException: com.google.inject.ProvisionException:
> Unable to provision, see the following following
> errors:
>
> 1) Error in custom provider, com.google.inject.OutOfScopeException: provider,
> com.google.inject.OutOfScopeException:
> Cannot access scoped [ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager]. scoped
> [ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager].
> Either we are not currently inside an an
> HTTP Servlet request, or you may have have
> forgotten to apply com.google.inject.servlet.GuiceFilter apply
> com.google.inject.servlet.GuiceFilter
> as a servlet filter for this request.
> at
> ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager.class(DialogRuntimeManager.java:30)
> while locating
> ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager
>
> 1 error at
> com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
> at
> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
> at
> ch.ivyteam.di.restricted.DiInjector.getInstance(DiInjector.java:43)
> at
> ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager.getInstance(DialogRuntimeManager.java:45)
> at
> ch.ivyteam.ivy.dialog.execution.jsf.view.IvyViewScopeHandler.generateViewScopeId(IvyViewScopeHandler.java:27)
> at
> org.apache.myfaces.view.ViewScopeProxyMap.getWrapped(ViewScopeProxyMap.java:76)
> at
> org.apache.myfaces.view.ViewScopeProxyMap.put(ViewScopeProxyMap.java:114)
> at
> org.apache.myfaces.view.ViewScopeProxyMap.put(ViewScopeProxyMap.java:42)
> at
> ch.axonivy.fintech.standard.guiframework.util.FacesContextUtil.setViewBean(FacesContextUtil.java:62)
> at
> ch.axonivy.fintech.standard.guiframework.util.GuiFrameworkUtil.getGuiFrameworkManagedBean(GuiFrameworkUtil.java:98)
> at
> ch.axonivy.fintech.standard.guiframework.eventlistener.impl.JsfLifeCycleListener.afterPhase(JsfLifeCycleListener.java:21)
> at
> org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:117)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:279)
> at
> org.apache.myfaces.extensions.validator.core.startup.ExtValLifecycleWrapper.render(ExtValLifecycleWrapper.java:77)
> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:200)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
> at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)
> at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
> at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
> at
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:442)
> at
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:178)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> at
> ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:55)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at
> java.lang.Thread.run(Thread.java:745)
> Caused by:
> com.google.inject.OutOfScopeException:
> Cannot access scoped
> [ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager].
> Either we are not currently inside an
> HTTP Servlet request, or you may have
> forgotten to apply
> com.google.inject.servlet.GuiceFilter
> as a servlet filter for this request.
at ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager.class(DialogRuntimeManager.java:30)
while locating ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at ch.ivyteam.di.restricted.DiInjector.getInstance(DiInjector.java:43)
at ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager.getInstance(DialogRuntimeManager.java:45)
at ch.ivyteam.ivy.dialog.execution.jsf.view.IvyViewScopeHandler.generateViewScopeId(IvyViewScopeHandler.java:27)
at org.apache.myfaces.view.ViewScopeProxyMap.getWrapped(ViewScopeProxyMap.java:76)
at org.apache.myfaces.view.ViewScopeProxyMap.put(ViewScopeProxyMap.java:114)
at org.apache.myfaces.view.ViewScopeProxyMap.put(ViewScopeProxyMap.java:42)
at ch.axonivy.fintech.standard.guiframework.util.FacesContextUtil.setViewBean(FacesContextUtil.java:62)
at ch.axonivy.fintech.standard.guiframework.util.GuiFrameworkUtil.getGuiFrameworkManagedBean(GuiFrameworkUtil.java:98)
at ch.axonivy.fintech.standard.guiframework.eventlistener.impl.JsfLifeCycleListener.afterPhase(JsfLifeCycleListener.java:21)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:117)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:279)
at org.apache.myfaces.extensions.validator.core.startup.ExtValLifecycleWrapper.render(ExtValLifecycleWrapper.java:77)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:200)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:468)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:442)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:178)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:55)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.google.inject.OutOfScopeException: Cannot access scoped [ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager]. Either we are not currently inside an HTTP Servlet request, or you may have forgotten to apply com.google.inject.servlet.GuiceFilter as a servlet filter for this request.
at > at
> com.google.inject.servlet.GuiceFilter.getContext(GuiceFilter.java:165)
at > at
> com.google.inject.servlet.GuiceFilter.getRequest(GuiceFilter.java:151)
at > at
> com.google.inject.servlet.ServletScopes$2$1.get(ServletScopes.java:152)
at > at
> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at > at
> com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at > at
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at > at
> com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
> ... 35 more