2 Replies Latest reply: Feb 27, 2012 8:31 AM by chrisis RSS

    Error deploying Cocoon 2.1.11 on WebLogic 10.3.5

    chrisis
      Deploying Cocoon 2.1.11 as downloaded from cocoon.apache.org with no changes and getting the following error
      <21-Feb-2012 16:23:57 o'clock GMT> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the a
      pplication 'cocoon'.
      weblogic.application.ModuleException: [HTTP:101216]Servlet: "Cocoon" failed to preload on startup in Web application: "c
      ocoon.war".
      java.lang.NoSuchMethodError: org.apache.log.output.ServletOutputLogTarget.<init>(Ljavax/servlet/ServletContext;Lorg/apac
      he/log/format/Formatter;)V
              at org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:800)
              at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:356)
              at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
              at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
              at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
              at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985)
              at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878)
              at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
              at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
              at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
              at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
              at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
              at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
              at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
              at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
              at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
              at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
              at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
              at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
              at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
              at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
              at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
              at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
              at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
              at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
              at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
              at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
              at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
              at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      
              at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
              at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
              at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
              at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
              Truncated. see log file for complete stacktrace
      Caused By: java.lang.NoSuchMethodError: org.apache.log.output.ServletOutputLogTarget.<init>(Ljavax/servlet/ServletContex
      t;Lorg/apache/log/format/Formatter;)V
              at org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:800)
              at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:356)
              at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
              Truncated. see log file for complete stacktrace
      It's a problem with WLS as the same war works under Jetty. Any ideas?

      Chris
        • 1. Re: Error deploying Cocoon 2.1.11 on WebLogic 10.3.5
          Steve Button-Oracle
          The error you are showing indicates that WLS does provide a version of Apache Logging Library, but it's not the same version that cocoon is built with and using:
          java.lang.NoSuchMethodError: org.apache.log.output.ServletOutputLogTarget.<init>(Ljavax/servlet/ServletContext;Lorg/apac
          he/log/format/Formatter;)V
                  at org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:800)
          In order to reconcile this, you simply need to provide a filtering classloader configuration for your application so that classes from the " org.apache.log.*" package are loaded from the web classloader and not from the WLS system classloader.

          The documentation (this is 12c but available on 10.3.5) for the configuration element is here:

          http://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogic_xml.htm#sthref278

          You'd create a weblogic.xml file with the configuration below and put it in the WEB-INF directory of your web application (adjacent to web.xml):
          <weblogic-web-app>
               <container-descriptor>
                   <prefer-application-packages>
                       <package-name>org.apache.log</package-name>
                   </prefer-application-packages>
               </container-descriptor>
          </weblogic-web-app>
          -steve-

          Edited by: Steve Button on Feb 27, 2012 10:42 AM
          • 2. Re: Error deploying Cocoon 2.1.11 on WebLogic 10.3.5
            chrisis
            Hi Steve,

            Even with a fair idea of what the issue was I just couldn't find the right configuration element.

            Many thanks,

            Chris