我使用的是grails 1.3.3和app-engine插件0.8.10;
我的测试用例是:
upload.gsp:
<form action="/test/process" method="post" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submit"/>
</form>
TestController有:
def process = {
println request.getFile("file").inputStream.text
}
我第一次尝试上传文件时遇到下一个错误:
Error 500: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details.
Servlet: _ah_default
URI: /test/process
Exception Message: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details.
Caused by: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details.
Class: Unknown
At Line: [-1]
Code Snippet:
堆栈跟踪:
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.<clinit>(DiskFileItem.java:103)
第一次上传后,任何其他上传尝试都会导致另一个错误:
错误500:无法初始化类org.apache.commons.fileupload.disk.DiskFileItem Servlet:_ah_default URI:/ test / process 异常消息:无法初始化类org.apache.commons.fileupload.disk.DiskFileItem 引发者:无法初始化类org.apache.commons.fileupload.disk.DiskFileItem 分类:未知 在线:[ - 1] 代码段:
堆栈跟踪
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem
at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196)
我在classpath中有100%的common-upload
我尝试过生产 - 同样的错误
我发现了下一个: http://ehcache.org/EhcacheUserGuide.html
49.7.1我收到错误java.lang.NoClassDefFoundError: java.rmi.server.UID是受限制的 类 您使用的是Ehcache版本 1.6之前。
但grails 1.3.3 dist的默认版本为1.7.1,我也试过1.6.2,1.7.2,2.0.0,2.2.0