Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在努力克服这个问题!在这里浏览了大多数类似的帖子,但没有运气。
部署很好,但在运行时出现问题。我正在使用 GlassFish 3.1.2.2 并使用 maven,应用程序部署为具有多个 JAR 并使用 EJB3、JPA、CDI 的 WAR。
最后我找到了原因:在我的一个带有会话 bean 的 jar 文件中,我在 src/main/resources/META-INF 目录中有一个缺少 beans.xml 文件。根据 cdi 规范,jar 需要这个文件才能被识别作为 bean 存档。希望这也能解决其他人的问题!干杯bb