当我使用以下行时,我没有收到错误
FileItemIterator it = servletFileUpload.getItemIterator(request);
当我使用以下行时,我明白了
List fileItemsList = servletFileUpload.parseRequest(request);
它们有何不同以及 rmi 与 servletFileUpload.parseRequest(request); 有何关系?
错误: 原因:
java.lang.NoClassDefFoundError: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at org.apache.commons.fileupload.disk.DiskFileItem.(DiskFileItem.java:103)
at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at morefile.CopyOfUploadApp.doPost(CopyOfUploadApp.java:147)
上下文:在谷歌应用程序上使用 Apache commons lib 的文件上传应用程序。