rich:fileUpload stackoverflow error at AjaxOutputTracker.get



>我目前正在迁移到富人脸 4.5、JSF2.2 并添加 primefaces-6.0(对于富人脸不支持的其他功能)我正在使用Tomcat 8作为服务器。

xhtml 文件中,我只是在下面放置简单的代码来测试这一点:

<rich:fileUpload id="upload"
     fileUploadListener="#{cc.attrs.beanPage.uploadListener}"
     maxFilesQuantity="1"
     acceptedTypes=".ppt, .pptx, .doc, .docx, .txt, .xls, .xlsx, .zip, .pdf"  />

在上传侦听器中,我只放了一些东西来调试

 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

以前它在旧版本中工作。知道我做错了什么吗?我怀疑我错过了一个导致这种情况的配置。

在这里和那里进行了一些测试后,我实际上设法解决了这个问题。修复程序只是放置limitRender="true",它解决了这个问题。

这可能是一个非常简单的问题,但我实际上不明白为什么这是必要的,因为我没有在这个文件上传中放置任何渲染。我可能会错过表格中的某些内容。编辑:经过一些检查,我发现页面中有ajaxRendered=true,但我不知道为什么它会给出递归溢出问题,因为它不会相互渲染。我可能错过了一些东西。

相关内容

最新更新