Genexus Uploadify无法处理大文件

时间:2016-06-20 15:03:07

标签: java xml tomcat genexus

我有一个在Genexus上制作的网站,其中包含一个在其中运行的上传控制,在本地Tomcat服务器上运行,并且它适用于小文件,但是当我尝试上传更大的文件时(> 50 MB)它似乎上传文件,但随后返回到交易屏幕。

我使用Google Chrome中包含的开发者工具进行了测试,我注意到,当我尝试上传大文件时," 500 - 内部服务器错误"发生。单击" Network"中的相应行。 tab提供了这个:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.commons.fileupload.DefaultFileItem.cleanup()V
at com.genexus.webpanels.HttpContextWeb.cleanup(Unknown Source)
at com.genexus.webpanels.GXWebObjectBase.doExecute(Unknown Source)
at br.com.procempa.spm.cauge.texpedientessoliceventosalter.doExecute(texpedientessoliceventosalter.java:21)
at com.genexus.webpanels.GXWebObjectStub.callExecute(Unknown Source)
at com.genexus.webpanels.GXWebObjectStub.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)

com.genexus.webpanels.GXWebObjectStub.callExecute(Unknown Source)
com.genexus.webpanels.GXWebObjectStub.doPost(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420)
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.28 logs.

Apache Tomcat/5.5.28

在某些网站上搜索,我找到了修改应用程序web.xml的建议,在< servlet>中添加了以下标记。 tomcat-directory / application-directory / WEB-INF / web.xml中的标记:

<multipart-config>
    <max-file-size>1073741824</max-file-size>
    <max-request-size>1073741824</max-request-size>
    <file-size-threshold>0</file-size-threshold>
</multipart-config>

然后编辑tomcat-directory / conf / server.xml以使端口8080的Connector标记如下所示:

<Connector port="8080" maxHttpHeaderSize="4096" maxPostSize="1073741824"
           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
           enableLookups="false" redirectPort="8443" acceptCount="100"
           connectionTimeout="600000" disableUploadTimeout="true" />

然后重新启动Tomcat,但它给了我同样的错误。我错过了什么吗?

提前致谢!

编辑:实际上,我的应用程序是Java应用程序,并且使用的控件不是真正的&#34; Uploadify&#34;它有类&#34; Image&#34;并链接到数据库中的BLOB字段。是不是在交易表单中更改字段类型?

1 个答案:

答案 0 :(得分:0)

在表单中检查Uploadify属性“Size Limit”。

在web.config中,检查maxRequestLength中的<system.web>requestLimits maxAllowedContentLength中的<security>

示例:

<system.web>
 <httpRuntime requestValidationMode="2.0" executionTimeout="600" maxRequestLength="50000"/>
</system.web>

<system.webServer>
 <security>
  <requestFiltering>
   <hiddenSegments>
    <add segment="PrivateTempStorage" />
    <add segment="private" />
   </hiddenSegments>
   <requestLimits maxAllowedContentLength="50000000"/>
  </requestFiltering>
 </security>
</system.webServer>