Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2124

Cannot deploy application that contains Log4j 2.9.x to weblogic server due to com.objectweb.asm.ClassReader errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.9.0, 2.9.1
    • None
    • Core
    • None
    • Linux weblogic server 12.1.3

    • Important

    Description

      When trying to deploy an application that contains log4j 2.9.0 or 2.9.1 to a weblogic 12.1.3 server I get the following deployment exceptions and the deployment fails.
      Looking at the stacktrace it seems that it has something to do with com.objectweb.asm which is repackaged as com.bea.objectweb.asm in the following library: asm-3.1.jar which is part of the core weblogic platform.
      Reverting back to log4j 2.8.2 fixes the issue and allows the application to be deployed.
      I have looked through the changes that were introduced in log4j 2.9.x and I think it could have something to do with jdk 9 multi-release support. Could it be that the old asm is having problems parsing the jdk 9 compiled classes contained within log4j ?

      <1511345766104> <BEA-149004> <Failures were detected while initiating deploy task for application "app".> 
      ####<Nov 22, 2017 2:16:06 AM PST> <Warning> <Deployer> <server> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
       <1511345766104> <BEA-149078> <Stack trace for message 149004
      weblogic.application.ModuleException: null
      null
              at weblogic.servlet.internal.WebAppModule.createModuleException(WebAppModule.java:1824)
              at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:270)
              at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:682)
              at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
              at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:98)
              at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
              at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:288)
              at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:301)
              at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:329)
              at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
              at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
              at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
              at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
              at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:233)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:749)
              at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1238)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:252)
              at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:172)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
              at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
      Caused By: java.lang.IllegalArgumentException
              at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
              at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
              at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:41)
              at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:240)
              at weblogic.application.utils.annotation.ClassfinderClassInfos.populateClassInfos(ClassfinderClassInfos.java:193)
              at weblogic.application.utils.annotation.ClassfinderClassInfos.<init>(ClassfinderClassInfos.java:44)
              at weblogic.servlet.internal.War.initializeClassInfosIfNecessary(War.java:446)
              at weblogic.servlet.internal.War.getAnnotatedClasses(War.java:376)
              at weblogic.servlet.utils.WarUtils.isJsfApplication(WarUtils.java:258)
              at weblogic.servlet.internal.WebAppModule.detectJsfApplication(WebAppModule.java:277)
              at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:262)
              at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:682)
              at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
              at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:98)
              at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
              at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:288)
              at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:301)
              at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:329)
              at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
              at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
              at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
              at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
              at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
              at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
              at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:233)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:749)
              at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1238)
              at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:252)
              at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:172)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
              at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
              at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sishbi Simon Billingsley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: