带有 wicket 的导航栏引发的 WicketRuntimeException:enclosure

问题描述 投票:0回答:1

我们运行一个 Wicket 应用程序,除其他外,它有一个导航栏 - 作为一个外壳实现。在浏览应用程序时,我们经常收到 WicketRuntimeException,但我们尚未能够重现该异常。

该问题似乎尤其发生在用户使用后退按钮或单击链接(尽管页面尚未完全构建)时。这是堆栈跟踪:

WARN RequestPageStore:130 - An error occurred while checking whether a page is stateless. Assuming it is stateful.
org.apache.wicket.WicketRuntimeException: Could not find child with id: navRepeater in the wicket:enclosure
        at org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:295) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.markup.html.internal.Enclosure.getChildComponent(Enclosure.java:273) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.markup.html.internal.Enclosure.getChild(Enclosure.java:136) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.markup.html.internal.Enclosure.isVisible(Enclosure.java:171) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Component.determineVisibility(Component.java:4359) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2124) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Component.isStateless(Component.java:2039) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Page$2.component(Page.java:477) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Page$2.component(Page.java:473) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:985) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Page.isPageStateless(Page.java:471) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.pageStore.RequestPageStore.isPageStateless(RequestPageStore.java:126) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:112) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.page.PageManager.detach(PageManager.java:91) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.Application$2.onDetach(Application.java:1584) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:105) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.listener.ListenerCollection$1.notify(ListenerCollection.java:121) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:145) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.util.listener.ListenerCollection.reversedNotifyIgnoringExceptions(ListenerCollection.java:114) ~[wicket-util-9.12.0.jar:9.12.0]
        at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:100) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:670) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:625) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:285) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:208) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:307) ~[wicket-core-9.12.0.jar:9.12.0]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:147) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:223) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:217) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.31.jar:5.3.31]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.31.jar:5.3.31]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.31.jar:5.3.31]
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) ~[spring-security-web-5.7.11.jar:5.7.11]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.31.jar:5.3.31]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.31.jar:5.3.31]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.31.jar:5.3.31]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.31.jar:5.3.31]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) ~[log4j-web-2.17.2.jar:2.17.2]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:354) ~[tomcat9-catalina-9.0.43.jar:9.0.43]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat9-coyote-9.0.43.jar:9.0.43]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat9-coyote-9.0.43.jar:9.0.43]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) ~[tomcat9-coyote-9.0.43.jar:9.0.43]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684) ~[tomcat9-coyote-9.0.43.jar:9.0.43]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat9-coyote-9.0.43.jar:9.0.43]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat9-util-9.0.43.jar:9.0.43]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

我应该朝哪个方向进一步调查?

java wicket
1个回答
0
投票

不要使用

<wicket:enclosure>
!它有很多问题。

请在 Java 代码中显式使用

EnclosureContainer
!阅读 https://nightlies.apache.org/wicket/guide/10.x/single.html#_hiding_decorating_elements_with_the_wicketenclosure_tag 了解更多

© www.soinside.com 2019 - 2024. All rights reserved.