gpt4 book ai didi

jsf - Websphere 上的 javax.enterprise.inject.UnsatisfiedResolutionException

转载 作者:行者123 更新时间:2023-12-04 19:11:05 25 4
gpt4 key购买 nike

我们有一个用 JSF 开发的应用程序,我们正在将其转换为使用 CDI。在此过程中,我们在 Wildfly 中进行了测试,我们能够像转换前一样启动并运行它。我们在Websphere上部署的时候出现了问题!

我们的应用程序有两个部分,为简单起见,第 1 部分和第 2 部分,第 1 部分生成的 jar 包含在第 2 部分中,这意味着部署在 Websphere 中的 war 文件已经包含第 1 部分的 jar 文件。

现在,当应用程序在 Websphere 中启动时,会抛出以下错误

[4/28/17 16:35:54:107 CEST] 00000083 BeansDeployer E BeansDeployer deploy 
javax.enterprise.inject.UnsatisfiedResolutionException: Api type [web.frmwrk.mgbean.WebSession] is not found with the qualifiers
Qualifiers: [@javax.enterprise.inject.Default()]
for injection into
Field Injection Point, field : protected web.frmwrk.mgbean.WebSession web.frmwrk.FacesBean.ws, Bean Owner : [-2102135427,Name:dealerLink,WebBeans Type:MANAGED,API Types:[web.mgbean.dealer.Link,web.frmwrk.FacesBean,java.lang.Object,java.io.Serializable],Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any,javax.inject.Named]]
InjectionType : [class web.frmwrk.mgbean.WebSession]
Annotated : [Annotated Field,Base Type : class web.frmwrk.mgbean.WebSession,Type Closures : [class web.frmwrk.mgbean.WebSession, class web.frmwrk.FacesBean, class java.lang.Object, interface java.io.Serializable],Annotations : [@javax.inject.Inject()],Java Member Name : ws]
Qualifiers : [[@javax.enterprise.inject.Default()]]
at org.apache.webbeans.util.InjectionExceptionUtils.throwUnsatisfiedResolutionException(InjectionExceptionUtils.java:92)

我们已经搜索了一个可能的解决方案,但到目前为止还没有成功。在我们的搜索过程中,我们发现了这个 page .我们确实在提到第 1 部分的 MANIFEST.MF 上添加了一个类路径,但没有任何改变。

你们有遇到过类似的问题吗?我们是否需要在 Websphere 上进行任何特殊配置才能使其像在 Wildfly 上一样工作?

最佳答案

您可能在 Wildfly 中使用了不同的 CDI 或 EE 规范级别。

您没有指定任何版本,也没有指定什么类应该满足该依赖性,也没有指定它的存储位置。但是您可能需要 jar 中的 beans.xml,其中包含旨在满足该依赖性的类。

关于jsf - Websphere 上的 javax.enterprise.inject.UnsatisfiedResolutionException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43733853/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com