Hi all I'm using ivy 6.3.0 with JSF + Primefaces, when i test my website with multiple users at the same time, i got this:

12:36:49.661 ERROR [ch.ivyteam.ivy.dialog.execution.jsf.error] [http-nio-8443-exec-393] [requestId=2235134]
  Error during rendering of html dialog
    com.google.inject.ProvisionException: Unable to provision, see the following errors:
    1) Error in custom provider, 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.

We also get this problem when i embed my page to another by using iframe

We don't use any api from com.google.inject, it could come from ivy library i guess.

Does anyone have any idea why this exception occurred? Thanks all

asked 11.10.2016 at 04:12

trungdv's gravatar image

trungdv
(suspended)
accept rate: 52%

edited 11.10.2016 at 15:09

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958

Can you share more insights about this request. Do you have a stack-trace?

(11.10.2016 at 09:33) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

I got the same problem when calling the following code

FacesContext.getCurrentInstance().getViewRoot().getViewMap().put(key, bean);

The full log:

com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error in custom provider, 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 com.google.inject.servlet.GuiceFilter.getContext(GuiceFilter.java:165) at com.google.inject.servlet.GuiceFilter.getRequest(GuiceFilter.java:151) at com.google.inject.servlet.ServletScopes$2$1.get(ServletScopes.java:152) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) ... 35 more

link

answered 11.10.2016 at 05:59

nvhuong's gravatar image

nvhuong
(suspended)
accept rate: 66%

edited 11.10.2016 at 06:01

Can you share more informations about this class: ch.axonivy.fintech.standard.guiframework.eventlistener.impl.JsfLifeCycleListener.afterPhase(JsfLifeCycleListener.java:21) It guess that the ivy-context is no longer set up in a late phase of the request.

(11.10.2016 at 09:31) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

inside this method, we call another method in order to obtain a managed bean using FacesContext.getCurrentInstance().getApplication().evaluateExpressionGet(context, "#{" + beanName + "}", clazz).

(11.10.2016 at 10:37) nvhuong nvhuong's gravatar image

However, we have a trick that if the result of finding the bean is null we retry to init manually a new instance of the bean by FacesContext.getCurrentInstance().getViewRoot().getViewMap().put(key, bean); (we actually have not yet understood why the managed bean is null sometimes). We just figured out that this implementation causes the problem as logged above in case we input a wrong bean name. This issue has been known and fixed by correcting the bean name.

(11.10.2016 at 10:37) nvhuong nvhuong's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×79
×58
×51

Asked: 11.10.2016 at 04:12

Seen: 4,461 times

Last updated: 11.10.2016 at 15:09