我正在尝试(自动)部署一个包含在WebLogic 12c应用服务器上使用JSF,PrimeFaces和OmniFaces组合的代码的耳朵。
时不时(最近有'现在'而不是'然后')所有可以从应用程序完成的AJAX请求都被破坏了。无论何时使用AJAX,都会从服务器返回以下响应:
java.lang.IllegalStateException: WebXml is not initialized yet. Please use #init(ServletContext) method to manually initialize it.
at org.omnifaces.config.WebXml.checkInitialized(WebXml.java:313)
at org.omnifaces.config.WebXml.getFormLoginPage(WebXml.java:294)
at org.omnifaces.context.OmniPartialViewContext$OmniPartialResponseWriter.startDocument(OmniPartialViewContext.java:253)
at org.primefaces.context.PrimePartialResponseWriter.startDocument(PrimePartialResponseWriter.java:133)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199)
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3296)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3262)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2171)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2097)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2075)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1514)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
在整个堆栈跟踪中,没有一行代码由我们编写。
为了清楚起见,这就是我们打包的内容(不相关的项目被排除在外;至少,我们希望它们是无关紧要的):
portal.ear
portal.ear/portal.war
portal.ear/portal.war/WEB-INF/lib/portal.jar
portal.ear/portal.war/WEB-INF/lib/omnifaces-1.6.3.jar
portal.ear/portal.war/WEB-INF/lib/primefaces-3.5.17.jar
由于Referencing CDI managed bean from Facelets error page中提到的问题,web.xml
只有一个错误页面:
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/login.xhtml?custom_msg=session_expired</location>
</error-page>
现在的问题是:我做错了什么?或者这是由OmniFaces与之前提到的软件堆栈结合引起的?
此致
的Rens
答案 0 :(得分:2)
问题看起来确实像种族条件。我尝试过BalusC建议的解决方法,从那时起我就没有看到过这个问题。
将等待包含该修复程序的OmniFaces版本,然后将删除该解决方法。
谢谢!