rmi error in google app

前端 未结 2 1975
一整个雨季
一整个雨季 2021-01-23 06:09

I dont get the error when I use the following line

    FileItemIterator it = servletFileUpload.getItemIterator(request);

I get it when I use

相关标签:
2条回答
  • 2021-01-23 06:37

    The DiskFileItem class from the Commons FileUpload library uses java.rmi.server.UID internally and usage of this class is forbidden by the Google Apps runtime environment. Since DiskFileItem is caching the uploaded file on the server file system and disk access is forbidden by Google Apps anyway, removing the dependency on the RMI specific UID class won't solve your problem.

    0 讨论(0)
  • 2021-01-23 06:40

    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.

    0 讨论(0)
提交回复
热议问题