1 Reply Latest reply on Sep 15, 2011 8:58 AM by tBodur

    Apex listener extension.

    tBodur
      Hi to all,

      When we unzip the Apex Listener, you can see a javadoc folder, giving us documents of the java methods. One of them is
      "public interface IPostProcessor
      extends IProcessor
      The post processing interface allows for the processing of the content written from the database before it's streamed to the browser. Example of modifying the stream......"

      After a little bit of digging arround, the example code can be reached at apex.jar within the class "oracle.dbtools.apex.hooks.samples.PostProcessSample"..

      I tried to execute the code given by adding a new entry key to apex-config.xml like fallow,
      <entry key="apex.extentions">oracle.dbtools.apex.hooks.samples.PostProcessSample</entry>

      As expected, the application server (WLS) returned an error code of,
      "####<Aug 1, 2011 3:22:52 PM EEST> <Warning> <HTTP> <atabankas.gaiabilgi.com.tr> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1312201372073> <BEA-101162> <User defined listener oracle.dbtools.rt.web.SCListener failed: java.lang.NullPointerException.
      java.lang.NullPointerException
      at oracle.dbtools.apex.hooks.ProcessorRegistry.register(ProcessorRegistry.java:29)
      at oracle.dbtools.rt.web.SCListener.contextInitialized(SCListener.java:41)
      at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
      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:41)

      ....
      "


      What is the best practice to test the given example?

      Thanks for your help.

      Tolga BODUR