服务器在 .ear 中找不到类
我的 .ear 文件有一些问题。该文件的结构是:
app.ear
|-xxx.jar
-yyy.jar
-zzz.jar
-ektorp.jar
-app-ejb.jar
-app-web.war
|-WEB-INF
|-lib
|-xxx.jar
|-yyy.jar
|-zzz.jar
|-ektorp.jar
当我尝试部署应用程序时,我收到 ClassNotFoundException,其中类 wihch 位于 ektorp.jar 中。该文件由 ejb 模块使用。
我也不知道为什么这些罐子会翻倍?在ear 和war 模块中是相同的.jar 文件。
Ear是由maven2构建的。
I have some problems with my .ear file. The structure of the file is:
app.ear
|-xxx.jar
-yyy.jar
-zzz.jar
-ektorp.jar
-app-ejb.jar
-app-web.war
|-WEB-INF
|-lib
|-xxx.jar
|-yyy.jar
|-zzz.jar
|-ektorp.jar
When I try to deploy my application, I get ClassNotFoundException, with class wihch is in ektorp.jar. This file is used by ejb module.
I also don't know why these jars are doubled? In ear and in war module are the same .jar files.
Ear is built by maven2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
EJB-JAR 是否在清单中的
Class-Path:
条目中引用ektorp.jar
(请参阅 打包 EJB 3 应用程序 了解更多背景信息)? FAQ 解释了如何配置插件在清单中生成Class-Path:
条目:以防万一,您是否知道可以使用 Java EE 6 将 EJB 打包在 .war 中(区别在于所有类都是使用 .war 打包时加载相同的类加载器)?如果您没有很强的模块化需求,.war 打包更简单。
Does the EJB-JAR reference
ektorp.jar
in theClass-Path:
entry in the manifest (see Packaging EJB 3 Applications for more background on this)? The FAQ explains how you can configure the plugin to generate aClass-Path:
entry in the manifest:Just in case, do you know that you can package EJBs in a .war with Java EE 6 (the difference is that all classes are loaded with the same classloader when using the .war packaging)? If you don't have strong modularization requirements, the .war packaging is simpler.