2010-08-03 66 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

相關問題