Google App Engine:部署后的ClassNotFoundException,但在本地服务器上运行正常 [英] Google App Engine: ClassNotFoundException after deploy but runs fine on local server

查看:161
本文介绍了Google App Engine:部署后的ClassNotFoundException,但在本地服务器上运行正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我学习Google应用引擎框架和服务,为此我构建了Google本身在Google应用引擎主页上提供的docs教程。



教程非常简单,构建一个使用数据存储来保存用户问候的留言簿网络应用程序。
我手头做了一切教程,一切都像他们说的那样。所以我部署了它(没有错误,部署成功)只是为了看到它,它工作得很好,当我从eclipse运行它,没有错误,所以有史以来。



<运行之前转移到更困难的例子,但是我收到一个错误500.检查日志我得到一个:java.lang.ClassNotFoundException:guestbook.SignGuestbookServlet,这是应用程序中唯一的servlet,它运行正常从我的机器为什么不是来自应用引擎?



web.xml上的映射是正确的(就像google一样),appengine-web.xml具有应用程序名称。怎么可能?
感谢提前。



编辑:好的,现在我觉得很笨。显然我必须在部署之前进行构建,我认为这个过程会从头开始构建一切,猜测我错了。对于浪费任何时间的对不起,我希望也许有时候会帮助有同样问题的人。

解决方案

我有一样的问题。当我记得我已经忘记在战争文件中添加一些依赖项。本地服务器的类路径上有jar,但是appengine服务器没有,因此我得到了一个ClassNotFoundException。



所以你可能需要检查哪个jar包含在战争。


im learning the google app engine framework and service and for that i built the tutorial google itself provides under "docs" on their google app engine homepage.

the tutorial is very simple, build a guestbook web app that uses a datastore to save "greetings" from users. i did everything on the tutorial by hand and everything exacly like they said to. it works just fine when i run it from eclipse, no errors what so ever.

so i deployed it (with no errors, "deploy successful") just to see it running before moving on to more difficult examples but i get an error 500. checking the logs i get a: "java.lang.ClassNotFoundException: guestbook.SignGuestbookServlet" thats the only servlet from the app, and it runs just fine from my machine why not from app engine?

the mapping on the web.xml is right (just like the google one) and appengine-web.xml has the application name. what can it be? thanks in advance.

EDIT: ok now i feel dumb. apparently i have to build before deploying, i thought the deply procedure would build everything from scratch for me, guess i was wrong. sorry for wasting anyone time and i hope maybe sometime it will help someone with the same problem.

解决方案

I had the same problem once. As I remembered it I had forgotton to add some dependencies in the war file. The local server had the jars on it's class path but the appengine server did not and thereby I got a ClassNotFoundException.

So you may need to check which jars is included in the war.

这篇关于Google App Engine:部署后的ClassNotFoundException,但在本地服务器上运行正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆