gpt4 book ai didi

java - ClassNotFoundException,如何查找缺少的类的使用位置

转载 作者:行者123 更新时间:2023-12-01 20:16:58 26 4
gpt4 key购买 nike

我正在 Weblogic 12c 上部署 EAR 包,并收到 ClassNotFoundException。然而,似乎该项目没有任何对相关缺失类的引用(我搜索了类名,结果为零)。我知道当尝试通过反射实例化缺少的类时会引发此异常。我怀疑某些库可能依赖于此类。

如何找出哪个配置或用户代码导致类的实例化?服务器日志没有提供足够的详细信息,但它是

<9.8.2017, 1:07:05,113 ip. EEST> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: weblogic.application.ModuleException: java.lang.ClassNotFoundException: fi.foo.bar.service.FoobarWebServiceImpl
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:78)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:52)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:750)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:260)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:66)
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:627)
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:347)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:901)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1456)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:456)
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:666)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused by: java.lang.ClassNotFoundException: fi.foo.bar.service.FoobarWebServiceImpl
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1026)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:987)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:608)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:540)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:493)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:470)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializer(WebAppServletContext.java:1414)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1360)
at weblogic.servlet.internal.WebAppServletContext.initContainerInitializers(WebAppServletContext.java:1341)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1907)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3091)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1823)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:882)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
at weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)

最佳答案

您的 Weblogic 无法加载管理控制台。也许更早地部署具有相关类的应用程序会失败。请尝试以下操作:

  1. 关闭该域下的所有集群

  2. 删除所有服务器上的tmpcache文件夹

  3. 删除pending目录下的config.xml文件

  4. 删除所有服务器上/config和/domain文件夹下的*.lok文件

  5. 重新启动管理

  6. 重新启动所有托管服务器

  7. 现在部署 war/ear 文件,它应该可以正常工作......

关于java - ClassNotFoundException,如何查找缺少的类的使用位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45589121/

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