0 Replies Latest reply on Mar 15, 2016 12:08 PM by Kuru Suntharalingam

    Problems with Listeners in Wildfly

    Kuru Suntharalingam Newbie

      I am in the process of Upgrading Jboss 5.1 GA to Wildfly 9 , When I deploy my application to Wildfly 9, it looks like the 'listener' mentioned in web.xml is not loading , I have copied the snap shot of logs from Jboss 5 , I don't see the same logs in the wildfly logs, I have copied the snapshot of web.xml as well. I don't see the similar logs in wildfly, Any one can help on this , what I missed?

       

      Logs from Jboss 5.1 GA

      2016-03-07 11:02:15,832 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:02:15,833 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |                           CANDY WEB                                                |

      2016-03-07 11:02:15,834 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Context Created                                                                          |

      2016-03-07 11:02:15,835 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Applying Log4J configuration                                                             |

      2016-03-07 11:02:15,837 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:02:15,838 INFO  [com.cons.candy.logger.AppRepositorySelector] (main) loading log4j_web.properties...

      2016-03-07 11:02:15,935 INFO  [com.cons.candy.logger.AppRepositorySelector] (main) ...log4j_web.properties loaded

      2016-03-07 11:02:15,937 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:02:15,937 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |                           CANDY WEB                                                |

      2016-03-07 11:02:15,938 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Log4J configuration applied                                                              |

      2016-03-07 11:02:15,939 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Web log files root :${jboss.server.home.dir}/log/candy-logs/candy_web/         |

      2016-03-07 11:02:15,940 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Main web log file  :%ROOT%/candy-web.log                                            |

      2016-03-07 11:02:15,940 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Call to FMS log file  :%ROOT%/candy_fms.log                                         |

      2016-03-07 11:02:15,941 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Security trail log file  :%ROOT%/candy_security_trail.log                           |

      2016-03-07 11:02:15,942 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) |Web user log files :%ROOT%/_%CUSTOMERTYPE%/%EMAILADDRESS%_%HOSTNAME%.log                  |

      2016-03-07 11:02:15,942 INFO  [com.cons.candy.listener.Log4jConfigListener] (main) +-----------------------------------------------------------------------------------------+

       

      2016-03-07 11:04:45,081 INFO  [com.cons.candy.listener.AppListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:04:45,081 INFO  [com.cons.candy.listener.AppListener] (main) |                           CANDY WEB                                                |

      2016-03-07 11:04:45,082 INFO  [com.cons.candy.listener.AppListener] (main) |Context Created                                                                          |

      2016-03-07 11:04:45,084 INFO  [com.cons.candy.listener.AppListener] (main) |Preparing GATE THREE WEB application                                                     |

      2016-03-07 11:04:45,085 INFO  [com.cons.candy.listener.AppListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:04:45,086 INFO  [com.cons.candy.util.AppProperties] (main)

      2016-03-07 11:04:45,088 INFO  [com.cons.candy.util.AppProperties] (main)  Properties for Development

      2016-03-07 11:04:45,089 INFO  [com.cons.candy.listener.AppListener] (main) +-----------------------------------------------------------------------------------------+

      2016-03-07 11:04:45,089 INFO  [com.cons.candy.listener.AppListener] (main) |                           CANDY WEB                                                |

      2016-03-07 11:04:45,090 INFO  [com.cons.candy.listener.AppListener] (main) | WEB application started                                                       |

      2016-03-07 11:04:45,090 INFO  [com.cons.candy.listener.AppListener] (main) +-----------------------------------------------------------------------------------------+

       

      Snapshot of web.xml

       

         <listener>

              <description>apply log4j config before starting app. Need to be the first listener</description>

              <display-name>Log4J Config Listener</display-name>

              <listener-class>com.cons.candy.listener.Log4jConfigListener</listener-class>

          </listener>   

           <context-param>

              <param-name>contextConfigLocation</param-name>

              <param-value>/WEB-INF/applicationContext.xml</param-value>

          </context-param>

          <listener>

              <description>Load all the bean defined in the application context.Need to be before Candy Web Listener.</description>

              <display-name>Spring Context loader Listener</display-name>

              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

          </listener>

          <listener>

              <description>Init the Candy Web app. Need to be after Spring Context loader</description>

              <display-name>Candy Web Listener</display-name>

              <listener-class>com.cons.candy.listener.AppListener</listener-class>

          </listener>