gpt4 book ai didi

java - 将 weblogic 升级到 12.2.1.3.0,将 java 从 1.7 升级到 1.8 - 异常 WELD-001408 依赖项不满足

转载 作者:行者123 更新时间:2023-12-02 10:46:48 34 4
gpt4 key购买 nike

我将weblogic升级到版本12.2.1.3.0(之前是12.1.2)。我尝试在 weblogic 服务器上部署应用程序(从 JAVA 7 开始),但收到异常:

 weblogic.management.DeploymentException: CDI deployment failure:WELD-001409: Ambiguous dependencies for type Manager with qualifiers @Default
[java] at injection point [BackedAnnotatedField] @Inject protected (here is the package path) package.Manager
[java] at package.Manager(Session.java:0)
[java] Possible dependencies:
[java] - Managed Bean [class package.Manager] with qualifiers [@Any @Default],
[java] - Managed Bean [class package.Manager] with qualifiers [@Any @Default]
[java] :org.jboss.weld.exceptions.DeploymentException:WELD-001409: Ambiguous dependencies for type Manager with qualifiers @Default
[java] at injection point [BackedAnnotatedField] @Inject protected package.Manager
[java] at package.Manager(Session.java:0)
[java] Possible dependencies:
[java] - Managed Bean [package.Manager] with qualifiers [@Any @Default],
[java] - Managed Bean [package.Manager] with qualifiers [@Any @Default]

我想补充一点,在“旧”weblogic 版本上部署期间,一切都已开启。

在部署期间将 java 升级到 1.8 后,我收到如下异常:

weblogic.management.DeploymentException: CDI deployment failure:Exception List with 2 exceptions:
[java] Exception 0 :
[java] org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ManagerAdapter with qualifiers @Default
[java] at injection point [BackedAnnotatedField] @Inject protected package.ManagerAdapter
[java] at package.ManagerAdapter(ProjectManagerBase.java:0)
[java]
[java] at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
[java] at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
[java] at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
[java] at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
[java] at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
[java] at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:504)
[java] at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:479)
[java] at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:446)
[java] at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
[java] at com.oracle.injection.provider.weld.WeldInjectionContainer.start(WeldInjectionContainer.java:150)
[java] at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:84)
[java] at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:43)
[java] at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:39)
[java] at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:752)
[java] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
[java] at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:262)
[java] at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:66)
[java] at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
[java] at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90)
[java] at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:631)
[java] at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)
[java] at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121)
[java] at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:348)
[java] at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:907)
[java] at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1468)
[java] at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:459)
[java] at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181)
[java] at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:217)
[java] at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:14)
[java] at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
[java] at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
[java] at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
[java] at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
[java] at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
[java] at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
[java] at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
[java] at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
[java] at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)

您有什么想法可能会出现问题或者我应该在哪里深入研究吗?

谢谢大家

最佳答案

您需要查看您的开发版本,例如,如果它是针对 JavaEE 6 的,而现在您正在使用 JavaEE 7 运行它,那么 JavaEE 7 中几乎没有什么不同。例如,它以不同的方式处理托管 bean 范围。就像 Java EE 7 中不再使用 @ViewScoped 注释一样(有一个新的 @FlowScoped)。您可以将日志级别调整为最精细,并深入了解发生的情况。

关于java - 将 weblogic 升级到 12.2.1.3.0,将 java 从 1.7 升级到 1.8 - 异常 WELD-001408 依赖项不满足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52494303/

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