gpt4 book ai didi

java - 无法部署到谷歌应用引擎

转载 作者:搜寻专家 更新时间:2023-11-01 02:52:39 28 4
gpt4 key购买 nike

我有一个小应用程序,在本地主机上测试时运行良好。

但是当我想将它部署到 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

最佳答案

您的项目是否在客户端使用 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 将 client/编译为 JavaScript 时,它需要其所有依赖项的完整源代码,并且有许多不应引用的类。但是,您似乎在“客户端”包中有一个 servlet (RDFServlet)。

您可能想要在您的项目中禁用 GWT,或者将 RDFServlet 移动到不属于 GWT 模块的包中。 (例如,如果您使用的是 Eclipse 示例项目,Servlet 将放在“服务器”包下的某处。

关于java - 无法部署到谷歌应用引擎,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8423556/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com