Weblogic报错:javax.naming.NameNotFoundException: While trying to look up jdbc in /app.;

先把问题踢出来:

javax.naming.NameNotFoundException: While trying to look up jdbc in /app.; remaining name 'jdbc'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
    at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
    at weblogic.deployment.PersistenceUnitInfoImpl.lookUpAppScopedDataSource(PersistenceUnitInfoImpl.java:529)
    at weblogic.deployment.PersistenceUnitInfoImpl.reconfig(PersistenceUnitInfoImpl.java:549)
    at weblogic.ejb.container.deployer.EJBModule.reconfigPersistenceUnits(EJBModule.java:529)
    at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:515)
    at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:107)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:411)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:74)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:66)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
    at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:16)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
    at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

我们重点来理解这句:javax.naming.NameNotFoundException: While trying to look up jdbc in /app.; remaining name 'jdbc'

意思是说,没有找到名称,在寻找jdbc的时候:

但是我在项目中没有使用look up来查找配置完的jdbc数据库,使用的项目EjbDemo已经删除,这里的jdbc是什么意思呢?

接下来,我们再往下看:

at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)

这里的报错,显然不是我们开发端的问题。

我们把weblogical控制面板打开:如下图:

选择Deployments,进入下面:


发现删除的项目这里仍然存在,EjbDemo还在没有删除。

这里我们把EjbDemo删除即可或者停止,问题解决。



你可能感兴趣的:(WebLogic,weblogic,jdbc)