Announcement Announcement Module
No announcement yet.
SimpleTraceInterceptor no console output Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleTraceInterceptor no console output


    i am trying to apply interceptors from spring framework like simpletraceinterceptor or PerformanceMonitorInterceptor and not getting any output statements in console or logs..if i use my own interceptor, then its working fine...any ideas...i tried log4j and commons logging in classpath but still dont see debug or tracing statemens in console or log file..i am using rational application developer for this tesing...any ideas what would be wrong..spring.xml as below

    <bean id="Adder1" class="springex.AdderImpl"/>
    <bean id="Adder2" class="springex.CopyImpl"/>
    <bean id="loggingInterceptor" class="pagecode.LoggingInterceptor"/>

    <bean id="performanceInterceptor" class="org.springframework.aop.interceptor.Perform anceMonitorInterceptor"/>
    <bean id="debugInterceptor" class="org.springframework.aop.interceptor.SimpleT raceInterceptor">
    <property name="useDynamicLogger"><value>true</value></property>
    <bean id="proxyCreator" class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames">

    <property name="interceptorNames">

  • #2
    looks like its log4 configuration there any way that we can configure these built in interceptors to use certain log4j.xml file instead of reading from different location...i am not able to locate why or where its reading the log4j.xml...everything works fine from command prompt but not from application server or rational application developer...


    • #3

      Websphere uses commons logging (same as Spring). If you are running within a Websphere app server with the classloader policy set to 'parent first' (which is the default setting) then Websphere gets to initialise the shared commons logging library with its own LogFactory.

      One way to get around this is to set the classloader policy to 'parent last' for your war or ear classloader and include commons-logging.jar either at the root of your ear or in WEB-INF/lib respectively.

      You can then initialise commons logging to use log4j by configuring the Log4jConfigServlet in your web.xml


      • #4
        thanks very much for the information..will try out the class loader policy..