WebLogic 12.2.1.3.0 部署问题(weblogic.application.naming.EnvironmentException: Unable to find injection

Posted

技术标签:

【中文标题】WebLogic 12.2.1.3.0 部署问题(weblogic.application.naming.EnvironmentException: Unable to find injection target named)【英文标题】:WebLogic 12.2.1.3.0 deployment issue (weblogic.application.naming.EnvironmentException: Unable to find injection target named) 【发布时间】:2019-07-08 22:43:24 【问题描述】:

我在将 spring roo 应用程序部署到 WebLogic 时遇到问题。在 Websphere 和 Tomcat 中运行良好,但 WebLogic 似乎遇到了困难。我之前已经在之前的 12c weblogic 实例上部署了该应用程序,但不记得是哪个以及具体是如何部署的。我已经尝试了 weblogic.xml 中的几乎所有内容来引用应用程序使用的首选应用程序包以及库引用,但对于几乎所有类,它总是给我以下错误:

weblogic.application.ModuleException: weblogic.application.naming.EnvironmentException: Unable to find injection target named: $interFieldInit$..._Roo_Jpa_ActiveRecord$...$entityManager on class: class ..._Roo_Jpa_ActiveRecord
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:57)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:114)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:752)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:262)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:52)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:631)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:348)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:907)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1468)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:459)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:217)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:14)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)

我在任何地方都找不到关于该错误以及如何解决它的任何信息。我希望它对运行它可能需要什么更具描述性。如果其他人遇到此问题,将不胜感激。

谢谢!

【问题讨论】:

【参考方案1】:

看起来像 Spring 配置问题。

自 12.2.1 版起,Oracle WebLogic Server 中已弃用 WebLogic Server/Spring 的集成功能。此外,从 12.2.1 版开始,使用 JRF 或受限 JRF 时不支持 Oracle WebLogic Server Spring 控制台扩展。

要为 Oracle WebLogic Server 开发和管理 Spring 应用程序,请参阅以下内容: https://docs.oracle.com/middleware/12212/wls/SPRNG/intro.htm#SPRNG288

【讨论】:

以上是关于WebLogic 12.2.1.3.0 部署问题(weblogic.application.naming.EnvironmentException: Unable to find injection 的主要内容,如果未能解决你的问题,请参考以下文章

Centos7安装weblogic12.2.1.3.0(开发环境)

WebLogic任意文件上传漏洞复现与分析 -CVE-2018-2894

Weblogic - 无法打开安装程序?

WebLogic12C安装配置文档

安装WebLogic失败,出现”[VALIDATION] [ERROR]:INST-07004: Oracle 主目录(O) 位置包含一个或多个无效字符“解决方案

weblogic12c部署遇到的问题和解决