2 Replies Latest reply: Sep 4, 2012 7:15 AM by 935512 RSS

    async is not supported if  filter defined with init-param in weblogic12c

    935512
      I want to use aync feature of servlet3.0 with weblogic12c.

      I have existing web application which is developed using older version servlet. This web application already has filters which intercepts every request.
      Now, I wanted to consume async feature of the servlet 3.0 and for this I have created the async servlet. But in order to serve async request by servlet we need to make filter async.
      For this i have made following change in the web.xml

      <filter>
      <display-name>Filter</display-name>
      <filter-name>Filter</filter-name>
      <filter-class>oracle.example.wls.ServletFilter</filter-class>
      <init-param>
      <param-name>weblogic.servlet.Filter.Head</param-name>
      <param-value>true</param-value>
      </init-param>
      *<async-supported>true</async-supported>*     
      </filter>
      <filter-mapping>
      <filter-name>Filter</filter-name>
      <url-pattern>/*</url-pattern>
      <dispatcher>REQUEST</dispatcher>
      </filter-mapping>

      After this I got following exception

      <Sep 4, 2012 12:14:23 AM PDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "application.filter" due to error weblogic.application.library.LibraryDeploymentException: [J2EE:160141]Could not initialize the library Extension-Name: application.filte. Ensure that the deployment unit is a valid library type (WAR, EJB, EAR, plain JAR). weblogic.application.library.LibraryProcessingException: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
      problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
      problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
      problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
      problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
      at weblogic.servlet.internal.WarLibraryDefinition.initDescriptors(WarLibraryDefinition.java:226)
      at weblogic.servlet.internal.WarLibraryDefinition.init(WarLibraryDefinition.java:299)
      at weblogic.application.utils.LibraryLoggingUtils.initLibraryDefinition(LibraryLoggingUtils.java:277)
      at weblogic.application.internal.library.LibraryDeployment.prepare(LibraryDeployment.java:63)
      at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
      at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:155)
      at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
      at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
      at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
      at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
      at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
      at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
      at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:192)
      at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:100)
      at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:291)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:250)

      I also made sure that, I am pointing version 3.0 in web.xml.
      Any pointer to this issue will be helpful.

      Edited by: 932509 on Sep 4, 2012 3:18 AM
        • 1. Re: async is not supported if  filter defined with init-param in weblogic12c
          935512
          Even changing the order has same exception which i mentioned in the first thread.

          <filter>
          <display-name>Filter</display-name>
          <filter-name>Filter</filter-name>
          <filter-class>oracle.example.wls.ServletFilter</filter-class>
          *<async-supported>true</async-supported>*
          <init-param>
          <param-name>weblogic.servlet.Filter.Head</param-name>
          <param-value>true</param-value>
          </init-param>
          </filter>
          <filter-mapping>
          <filter-name>Filter</filter-name>
          <url-pattern>/*</url-pattern>
          <dispatcher>REQUEST</dispatcher>
          </filter-mapping>

          Any pointer how I can define <init-param> with <async-supported>

          Edited by: 932509 on Sep 4, 2012 3:17 AM
          • 2. Re: async is not supported if  filter defined with init-param in weblogic12c
            935512
            Another observation is , I added <async-supported> tag in the filter-app.war, but on weblogic console I can see the validations error for dif.war.
            What does following highlighted issue means?

            It seems the webligic issue, but not sure

            <Sep 4, 2012 5:06:15 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
            <Sep 4, 2012 5:06:15 AM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
            <Sep 4, 2012 5:06:17 AM PDT> <Error> <Munger> <BEA-2156200> <Unable to load descriptor /net/adc2201793/scratch/vaimodi/view_storage/vaimodi_main/work/middleware/oracle_common/modules/oracle.dif/dif.war/WEB-INF/web.xml of module dms.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
            at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)
            at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:325)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:803)
            at weblogic.application.descriptor.AbstractDescriptorLoader2._mergeDescriptors(AbstractDescriptorLoader2.java:578)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptors(AbstractDescriptorLoader2.java:499)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptors(AbstractDescriptorLoader2.java:476)
            at weblogic.servlet.internal.WebAppDescriptor.mergeLibaryDescriptors(WebAppDescriptor.java:179)
            at weblogic.servlet.internal.WebAppModule.mergeLibraryDescriptors(WebAppModule.java:434)
            at weblogic.servlet.internal.WebAppModule.mergeLibraryDescriptors(WebAppModule.java:425)
            at weblogic.servlet.internal.WebAppModule.mergeLibraryDescriptors(WebAppModule.java:411)
            at weblogic.servlet.internal.WebAppModule.processWebAppLibraries(WebAppModule.java:446)
            at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:258)
            at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:637)
            at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
            at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:96)
            at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
            at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:312)
            at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:325)
            at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:378)
            at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:707)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
            at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
            at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:48)
            at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
            at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
            at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:155)
            at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
            at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
            at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
            at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
            at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:220)
            at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
            at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
            at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:192)
            at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:100)
            at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:291)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:250)
            .>
            <Sep 4, 2012 5:06:17 AM PDT> <Error> <HTTP> <BEA-101370> <There was a failure when merging library descriptors into the application descriptors for application WebAppModule(DMS Application [Version=11.1.1.1.0]:dif.war). Ensure that the descriptors are valid. The error is VALIDATION PROBLEMS WERE FOUND
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>>
            <Sep 4, 2012 5:06:17 AM PDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application "DMS Application [Version=11.1.1.1.0]" due to error weblogic.application.ModuleException: [HTTP:101370]There was a failure when merging library descriptors into the application descriptors for application WebAppModule(DMS Application [Version=11.1.1.1.0]:dms.war). Ensure that the descriptors are valid. The error is VALIDATION PROBLEMS WERE FOUND
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            weblogic.application.ModuleException: [HTTP:101370]There was a failure when merging library descriptors into the application descriptors for application WebAppModule(DMS Application [Version=11.1.1.1.0]:dms.war). Ensure that the descriptors are valid. The error is VALIDATION PROBLEMS WERE FOUND
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            at weblogic.servlet.internal.WebAppModule.mergeLibraryDescriptors(WebAppModule.java:417)
            at weblogic.servlet.internal.WebAppModule.processWebAppLibraries(WebAppModule.java:446)
            at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:257)
            at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:637)
            at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
            Truncated. see log file for complete stacktrace
            Caused By: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            problem: cvc-complex-type.2.4a: Expected element 'init-param@http://java.sun.com/xml/ns/javaee' instead of 'async-supported@http://java.sun.com/xml/ns/javaee' here in element filter@http://java.sun.com/xml/ns/javaee:<null>
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
            at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
            at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)
            at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:325)
            at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:803)
            Truncated. see log file for complete stacktrace