java对谷歌不兼容_java – 无法部署到谷歌应用引擎

我有一个小应用程序,当在localhost上进行测试时工作正常.

但是当我想将它部署到谷歌应用引擎服务器时,我遇到了错误:

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

解决方法:

您的项目是否为客户端使用GWT?当您尝试执行特殊的GWT补充步骤时,您的部署失败.

我相信你的问题是你的RDFServlet类是GWT模块的一部分,这不是你想要的.

GAE的默认Eclipse项目预先配置为与GWT一起使用.该示例中的包结构如下:

client/

shared/

server/

当GWT将client / down编译为JavaScript时,它需要所有依赖项的完整源代码,并且有许多类不应该被引用.但是,您似乎在“client”包中有一个servlet(RDFServlet).

您可能希望在项目中禁用GWT,或者将RDFServlet移动到不属于GWT模块的包中. (例如,如果您正在使用Eclipse示例项目,则Servlet将放在“server”包下的某个位置.

标签:java,google-app-engine

来源: https://codeday.me/bug/20190626/1292996.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值