2011-12-07 177 views
3

我有一個小應用程序,它在本地主機上測試時工作正常。無法部署到谷歌應用程序引擎

但是,當我要部署到Google App Engine的服務器,我有放入系統錯誤:

Compiling module org.magnetik.semola.Org_magnetik 
    Validating newly compiled units 
     Ignored 1 unit with compilation errors in first pass. 
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. 
    Finding entry point classes 
     [ERROR] Errors in 'file:/C:/Users/magnetik/git/semola-rdf/org.magnetik/src/org/magnetik/semola/client/RDFServlet.java' 
     [ERROR] Line 13: No source code is available for type javax.servlet.http.HttpServlet; did you forget to inherit a required module? 
     [ERROR] Line 16: No source code is available for type javax.servlet.http.HttpServletRequest; did you forget to inherit a required module? 
     [ERROR] Line 16: No source code is available for type javax.servlet.http.HttpServletResponse; did you forget to inherit a required module? 
     [ERROR] Line 25: No source code is available for type com.hp.hpl.jena.rdf.model.Model; did you forget to inherit a required module? 
     [ERROR] Line 25: No source code is available for type com.hp.hpl.jena.rdf.model.ModelFactory; did you forget to inherit a required module? 
     [ERROR] Line 37: No source code is available for type java.io.ByteArrayInputStream; did you forget to inherit a required module? 
     [ERROR] Unable to find type 'org.magnetik.semola.client.RDFServlet' 
     [ERROR] Hint: Previous compiler errors may have made this type unavailable 
     [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 

有用的文件,(我認爲)在這裏:http://pastebin.com/zuELG18u

+0

您可以檢查gwt.xml是否包含所有必需的模塊。例如,使用GWT XML,需要繼承XML模塊,如:

回答

4

請問您的項目中使用GWT的客戶端?當您嘗試執行特殊的GWT合成步驟時,您的部署失敗。

我相信你的問題是你的RDFServlet類是GWT模塊的一部分,這不是你想要的。

GAE的默認Eclipse項目預先配置爲與GWT一起使用。該軟件包是結構的例子是這樣的:

client/ <--- GWT code (for client side, compiled to JavaScript) 
shared/ <--- Code necessary on both the client and server 
server/ <--- Server side code 

當GWT編譯的客戶端/下降到JavaScript的,它需要所有依賴的全部源代碼,並有一些不應該被引用的許多類。但是,您似乎在「客戶端」軟件包中有一個servlet(RDFServlet)。

您可能想要在您的項目中禁用GWT,或將RDFServlet移動到不屬於GWT模塊的程序包中。 (例如,如果您使用的是Eclipse示例項目,則Servlets將放在「服務器」包的某個位置。

+0

我沒有使用任何GWT工具,禁用Eclipse中的GWT工具功能已經完成了這個技巧。 – magnetik

相關問題