我以确定的方式得到这个问题很有帮助,但是无用的一点是问题出现在使用Google App Engine for Java(GA / J)的生产中,但是使用GAE / J dev应用服务器时不会发生我的本地机器。
我有以下页面类,都来自WebPage:
PageHome (stateless)
PageBrowse (stateless)
PageSearch (stateful)
PageImages (stateful)
PageImage (stateful)
我浏览路径,所有图像都成功显示:
PageHome
|
|
V
PageBrowse or PageSearch
|
|
V
PageImages (all images are shown)
|
|
V
PageImage (the image is shown)
|
|
V
PageImages (all images are shown)
|
|
V
PageBrowse or PageSearch (respectively)
|
|
V
PageHome
我尝试使用以下结果浏览与开发中相同的“浏览”路径:
PageHome
|
|
V
PageBrowse
|
|
V
PageImages (all images are shown)
|
|
V
PageImage (image showing fails - the framework attempts to show the image component from PageImages instead of from PageImage)
|
|
V
PageBrowse (the submit button goes directly to this page instead of to PageImages)
|
|
V
PageHome
我尝试使用以下结果浏览与开发中相同的“搜索”路径:
PageHome
|
|
V
PageSearch
|
|
V
PageImages (all images are shown)
|
|
V
PageImage (the image is shown)
|
|
V
PageImages (the showing of all images fails - the framework attempts to show the image components from PageImage instead of from PageImages)
|
|
V
PageImages (the submit button goes to this page again instead of to PageSearch, with failed image showing)
|
|
V
PageImages (...)
由于此问题出现在GAE / J生产中,而不是GAE / J dev应用服务器上,因此该问题可能是由不同Web服务器存储会话的方式引起的。这可能与我在Intermittently missing Wicket session flash messages的StackOverflow帖子“Intermittently missing Wicket session flash messages”有关。
在“浏览”路径中,使用表单
的代码从PageImages移动到PageImage时PageImage pgNext = new PageImage(...);
setResponsePage(pgNext);
框架似乎在PageImage上运行,好像它仍然在PageImages上:它试图从PageImages获取其图像组件,并且其表单提交事件处理程序在PageImages中执行相同的操作。
同样,在“搜索”路径中,使用表单代码从PageImage移动到PageImages时
PageImages pgNext = new PageImages(...);
setResponsePage(pgNext);
框架似乎在PageImages上表现得好像它仍然在PageImage上:它试图从PageImage获取其图像组件,并且它的表单提交事件处理程序在PageImage中执行相同的操作。
也许这个问题出现在两个路径的不同页面上,因为PageBrowse是无状态的,而PageSearch是有状态的。
有没有人有任何明智的想法或意见?
生产
Web server: Google App Engine for Java (GAE/J) version 1.8.7
Java version: ? [GAE/J dictated]
Java run-time: ? [GAE/J dictated]
Operating system: ? [GAE/J dictated]
开发
Web server: Google App Engine app dev server for Java version 1.8.7
Java version: 1.7.0_45; Java HotSpot Client VM 24.45-b08
Java run-time: Java SE Runtime Environment 1.7.0_45-b18
Operating system: Microsoft Windows XP Home Edition version 2002 SP3 running on x86
适用于生产和开发
Web framework: Apache Wicket 6.12.0
org.apache.wicket.DefaultExceptionMapper internalMap: Unexpected error occurred
org.apache.wicket.core.request.handler.ComponentNotFoundException: Could not find component 'frmForm:enclFound:lvImageDetails:5:imgImage' on page 'class [...].PageImage
at org.apache.wicket.core.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:182)
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:90)
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:231)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:125)
...
答案 0 :(得分:0)
我通过将从6.12.0
使用的Apache Wicket Web框架版本回滚到6.11.0
来解决了这个问题。
我不知道为什么这个动作解决了这个问题,但确实如此。