2010-08-03 54 views
0

我正在使用grails 1.3.3和app-engine插件0.8.10;grails +应用程序引擎上传错误

我的测试情况是:

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) 

之后的第一时间的任何企图再次上传会导致另一个错误:

Error 500: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem Servlet: _ah_default URI: /test/process Exception Message: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem Caused by: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem Class: Unknown At Line: [-1] Code Snippet:

而堆栈跟踪

java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.fileupload.disk.DiskFileItem 
at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:196) 

我有100%通用上传类路径

我试图运行在生产 -

我已经找到下一个同样的错误: http://ehcache.org/EhcacheUserGuide.html

49.7.1 I get an error java.lang.NoClassDefFoundError: java.rmi.server.UID is a restricted class You are using a version of Ehcache prior to 1.6.

但默认版本Grails的1.3.3 DIST是1.7.1,我也尝试过1.6。 2,1.7.2,2.0.0,2.2.0

回答

0

我认为这是因为java.rmi.server.UID不是一个whitelisted GAE类,即你不允许使用它。

+0

是的,但我没有使用这个类))。据我所知 - 上传的grails arch(我注意到的弹簧)中的拦截器之一使用它。我不使用任何其他库exept安装应用程序引擎插件。 而巫婆程序上传的方法没有实现 - 只是println .. 冲浪互联网我发现Ehcache的问题......但关闭和更改版本并没有帮助。 – 2010-08-05 18:36:34

相关问题