谷歌应用程序中的rmi错误 [英] rmi error in google app
问题描述
FileItemIterator it = servletFileUpload.getItemIterator(request);我没有得到错误信息。
当我使用以下行时获得它
List fileItemsList = servletFileUpload.parseRequest(request);
它们有什么不同,以及rmi与servletFileUpload.parseRequest(request);?
错误:
导致:
java.lang.NoClassDefFoundError :java.rmi.server.UID是一个受限制的类。有关更多详细信息,请参阅Google App Engine开发人员指南。
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)
上下文:
在Google应用上使用Apache commons lib的文件上传应用程序。
I dont get the error when I use the following line
FileItemIterator it = servletFileUpload.getItemIterator(request);
I get it when I use following line
List fileItemsList = servletFileUpload.parseRequest(request);
How are they different and How is rmi related to servletFileUpload.parseRequest(request);?
Error: Caused by:
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)
Context: A file upload application using Apache commons lib on google apps.
Commons FileUpload (1.2.1) is only semi-compatible with GAE. Only streaming API is supported but not the traditional API beacuse a local filesystem is not made available by GAE. In the stacktace, I see usage of DiskFileItem, which basically writes the uploaded file locally and deletes it later.
See the section under Apache Commons FileUpload at GAE and support for Java frameworks
Here's the streaming API usage.
这篇关于谷歌应用程序中的rmi错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!