我在一个运行良好的 EJB3 项目中收到 404 错误
我试图查看我在学校做的一个旧的 EJB3 项目,但我唯一能看到的是浏览器上的 index.jsp。我得到的错误是:
SEVERE: Class [ Lse/ernesto/databaseStuff/DbManagerLocal; ] 未找到。加载 [ class se.ernesto.client.UpdateEventServlet ] 时出错
DBManagerLocal 是无状态会话 Bean 的接口。 UpdateEventServlet 是动态 Web 项目中的一个 servlet。请注意,我已将 EJB 项目添加到 WEB 项目的构建路径中。
其他 jsp 文件位于我的动态 Web 项目的 WEB-INF 文件夹中。但似乎没有找到负责加载这些 jsp 文件的 servlet。这很奇怪,因为该项目之前(1年前)一直在运行,从那时起我更新到了OSX Lion,我不知道新操作系统和EJB3是否存在问题。 该项目由一个Dynamic Web 项目、一个EJB3 项目和一个EAR 项目组成,所有这些项目都通过Eclipse 部署在Glassfish 服务器中。有人遇到过这个问题吗?
预先非常感谢。
i'm trying to see an old EJB3 project that i did at school but the only thing i can see is the index.jsp on the browser. The error i get is:
SEVERE: Class [ Lse/ernesto/databaseStuff/DbManagerLocal; ] not found. Error while loading [ class se.ernesto.client.UpdateEventServlet ]
The DBManagerLocal is an interface for a stateless session bean. The UpdateEventServlet is a servlet in the Dynamic Web Project. Note that i have added the EJB Project to the WEB Project's build path.
The other jsp files are in the WEB-INF folder in my Dynamic Web Project. But it seems it doesn't find the servlets which are responsible for loading these jsp files. This is weird because the project was working before (1 year ago) Since then i updated to OSX Lion, i don't know if there's an issue with the new OS and EJB3.
The project is composed by a Dynamic Web Project, a EJB3 Project and an EAR Project, all of those are deployed via Eclipse in a Glassfish server. Has anyone run into this problem?
Thanks a lot in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简单的答案是 Web 容器找不到类/接口,因为它“不存在”。或者更准确地说,因为它不在它期望找到它的一个或多个地方。
我要做的是对 Web 容器的目录树进行彻底搜索。从已安装的 web 应用程序的 WEB-INF/classes 目录开始,包括该目录中的所有 JAR 文件。然后查看共享库区域。
如果您找不到该类或包含该类的 JAR,那么这就是您的问题。如果您可以找到它,但 Web 容器代码却找不到,则它可能位于错误的位置。无论哪种方式,您的(当前)构建/部署过程中都会出现某些问题;例如您项目的 Eclipse 设置。
(为什么它以前有效?谁知道呢。也许你正在以不同的方式构建/部署。也许你手动部署了一些东西......)
The simple answer is that the web container cannot find the class / interface because it is "not there". Or more precisely, because it is not in the place or places that it is expecting to find it.
What I would do is to do a thorough search of the directory tree of the web container. Start with the installed webapp's WEB-INF/classes directory, including any JAR files in that directory. Then look in the shared library area.
If you can't find the class, or a JAR containing the class, then that's your problem. If you can find it but the web container code can't, it is probably in the wrong place. Either way, something is broken in your (current) build / deploy processes; e.g. your project's Eclipse settings.
(Why did it work before? Who knows. Perhaps you are building / deploying differently. Perhaps you deployed something manually ... )