当前位置: 首页 > 知识库问答 >
问题:

CDI部署失败:COM/SUN/Enterprise/InjectionException

齐朝明
2023-03-14

我一直试图解决这里的问题:以前的部署错误,我已经将应用程序代码减少到最小。我仍然有问题将应用程序部署到GlassFish 4。

这里是服务器日志:

INFO:   WELD-000119 Not generating any bean definitions from com.sun.faces.vendor.Tomcat6InjectionProvider because of underlying class loading error: Type org.apache.AnnotationProcessor not found.  If this is unexpected, enable DEBUG logging to see the full error.
INFO:   WELD-000119 Not generating any bean definitions from com.sun.faces.vendor.Jetty6InjectionProvider because of underlying class loading error: Type Lorg.mortbay.jetty.plus.annotation.InjectionCollection; not found.  If this is unexpected, enable DEBUG logging to see the full error.
INFO:   WELD-000119 Not generating any bean definitions from com.sun.faces.vendor.GlassFishInjectionProvider because of underlying class loading error: Type com.sun.enterprise.InjectionException not found.  If this is unexpected, enable DEBUG logging to see the full error.
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class com.sun.faces.taglib.jsf_core.MaxMinValidatorTag. It will not be possible to produce instances of this type!
WARNING:   WELD-001529 An InjectionTarget implementation is created for a class javax.faces.webapp.UIComponentTag$UIComponentTagAdapter which does not have any appropriate constructor.
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.UIComponentBodyTag. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.ConverterELTag. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.UIComponentELTag. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.UIComponentClassicTagBase. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.UIComponentTag. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.UIComponentTagBase. It will not be possible to produce instances of this type!
WARNING:   WELD-001519 An InjectionTarget implementation is created for an abstract class javax.faces.webapp.ValidatorELTag. It will not be possible to produce instances of this type!
SEVERE:   Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:com/sun/enterprise/InjectionException
    at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:225)
    at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
    at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)

我还将应用程序代码推送到了guthub:testfish1代码中

应用程序包括:

  1. template.xhtml
  2. index.xhtml
  3. movietest.java(实体)
  4. abstractfacade.java
  5. MovieFacaderest.java

谢谢你的帮助

共有1个答案

章睿
2023-03-14

您有两个依赖项没有按所提供的列出。一个是javaee-api,另一个是javax.inject。下面是您的更新pom.xml的要点:https://gist.github.com/johnament/11327517

 类似资料:
  • 我使用Netbeans创建了带有ejb模块和war模块的Java企业应用程序。我对战争模块做了一些改动,一切正常。但现在我正在尝试调用ejb模块中定义的远程ejb。我已经学习了本教程https://netbeans.org/kb/docs/javaee/entappclient.html。现在,当我尝试在应用服务器(JBossAS7)中部署ear文件时,我得到以下错误: {“JBAS014653:

  • 我正在尝试在Heroku上托管Flask web应用程序,同时使用以下步骤来托管我的web应用程序: 在我完成所有这些之后,我的终端绝对没有错误,但是烧瓶应用程序仍然不工作。下面给出了Heroku的日志。 2022-02-12T09:27:20.056100 00:00heroku[router]: at=错误代码=H14 desc="没有web进程运行"方法=GET路径="/"主机=bukkit

  • 问题内容: 我有一个应用程序,它具有多个模块和各种依赖性。在Glassfish 4上部署应用程序时,出现错误: 可能是什么原因?我已经看到了有关此主题,解决方案是编辑注释,但这不是我的,而是依赖项。如何避免这种异常? 我正在将Java EE 6与JDK 1.7和Glassfish 4.0一起使用。 问题答案: Glassfish已经为您打包了Jerseys库,因此您需要按照docs所述在Maven

  • 我曾尝试使用Wildfly管理控制台(Wildfly 10.1.0.Final)部署我的应用程序,但由于以下原因/错误,不幸失败: 无法上载部署:{"WFLYCTL0080:失败的服务"= 我使用了控制台上提供的替换部署功能。在此之前,我已经使用相同的函数上传了我的. war应用程序,并成功部署。 我已经在本地测试了我的应用程序,它可以在没有任何错误的情况下部署和执行。

  • 我在一个项目中使用全方位。一切都很好。我遇到的问题是我不能测试项目,因为我不能启动TomEE,不管我使用什么方法(EJBContainer、Application ationComposer或Arquillian嵌入式)。 似乎Omniface有豆子问题什么的。我做了一个样本Maven项目https://bitbucket.org/zmirc/tomee-omnifaces-bug 你可以看到,我

  • 我正在使用ApacheTomcat(TomEE)/8.0。29(7.0.0-M1) 从Omnifaces 2.4更改为2.5/2.5后。我得到了这个例外。 ... 更新:它现在与版本2.5.1工作,但我不知道为什么。 也许是这个豆子。xml 我再生到这个豆子。xml