【发布时间】:2016-07-15 09:18:38
【问题描述】:
我目前正在迁移到richfaces 4.5、JSF2.2 并添加primefaces-6.0(对于richfaces 不支持的其他功能) 我正在使用 Tomcat 8 作为服务器。
在 xhtml 文件中,我只是在下面放了简单的代码来测试一下:
<rich:fileUpload id="upload"
fileUploadListener="#{cc.attrs.beanPage.uploadListener}"
maxFilesQuantity="1"
acceptedTypes=".ppt, .pptx, .doc, .docx, .txt, .xls, .xlsx, .zip, .pdf" />
在uploadListener我只放了一些东西来调试
public void uploadListener(FileUploadEvent event) {
this.item = event.getUploadedFile();
String projectFileName = this.item.getName();
}
当我调试时,我看到它到达了侦听器并且没有错误地结束。但是在侦听器完成后,我在下面收到此错误:
java.lang.StackOverflowError
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:679)
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:643)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:86)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91).. keep repeating
Jul 15, 2016 4:09:36 PM org.primefaces.application.exceptionhandler.PrimeExceptionHandler logException
SEVERE: null
java.lang.StackOverflowError
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:679)
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:643)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:86)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91)... keep repeating
Jul 15, 2016 4:09:38 PM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/PORTAL].[Faces Servlet] invoke
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/PORTAL] threw exception [Servlet execution threw an exception] with root cause
java.lang.StackOverflowError
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:679)
at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:643)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:86)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91)
at org.richfaces.context.AjaxOutputTracker.getAjaxOutputs(AjaxOutputTracker.java:91)..... and so on keep repeating
以前它在旧版本中工作..知道我做错了什么吗?我怀疑是我错过了导致此问题的配置。
【问题讨论】:
-
什么是“旧版本”?没有 PF 还是使用较旧的 RF 和 JSF?
-
没有 PF 和旧的 RF 和 JSF。
-
你解决了jQuery版本冲突吗(因为总是有这样的冲突)?顺便提一句。这看起来有点可疑,在 findComponent 中的 SOE。
-
可疑是什么意思?你的意思是这个问题可能是由 jQuery 冲突引起的?
-
这意味着我不知道它可能是什么以及可能导致它的原因。 (jQuery 可以混合
rich:fileUpload行为,但不会导致任何服务器错误)
标签: java jsf richfaces stack-overflow