2 Replies Latest reply on Jan 17, 2014 1:58 PM by Vineela Gampa

    Migrating WAR from Websphere to EAP 6.1.0 GA

    Vineela Gampa Novice

      Hi All


      I am migrating my war from websphere 7 to jboss 6 EAP. I want to use my own log4j.properties located at WebsiteServicesGateway.war\WEB-INF\classes\META-INF\logging\log4j.properties.  Attached the log4j.properties for your reference.


      My deployment structure is at WebsiteServicesGateway.war\WEB-INF\ with contents.


      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">


         <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->


                  <module name="org.apache.log4j" />

           <module name="org.jboss.log4j.logmanager"/>





      I start the server with org.jboss.as.logging.per-deployment=false all will be logged under [stdout]. Log file wssg.log is getting created but no logs to that file . all the logs are going to server.log ( MY -D properties , -Dapp.log.console.threshold=INFO -Dorg.jboss.as.logging.per-deployment=false -Dapp.log.root=C:\Temp")  I tried -Dlog4j.configuration pointing to log4j.properties.


      Our app is using spring with jersey , so we have the below configuration.







      In server.log i see app is reading the log4j.properties file , and it creats those files but nothing gets printed.

      Initializing log4j from [classpath:META-INF/logging/log4j.properties]

      12:10:09,977 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/WebsiteServicesGateway]] (ServerService Thread Pool -- 59) Initializing Spring root WebApplicationContext

        • 1. Re: Migrating WAR from Websphere to EAP 6.1.0 GA
          Vineela Gampa Novice

          Forum discussions are active as its been 4 days since i postedit in forums but no responses


          I made little progress by adding exclusions for log4j and slf4j in my jboss-deployment-structure.xml. Now most of the messages are appearing.


          Jboss-deployment-structure.xml contents



            <module name="org.apache.log4j" />

                <module name="org.slf4j.jcl-over-slf4j" />

                <module name="org.slf4j.impl" />

                <module name="org.slf4j" />

                <module name="org.slf4j.ext"/>


          But the loggers from com.sun.jersey.api.client.filter.LoggingFilter are not appearing . Jersey using java.util.logging . Below is the configuration for it. Log4j and Slf4j logging works fine but jdk logging doesnt happen to the configured loggers but rather routes to jboss logging.

          Which modules i need to skip or anything that i have to add as dependency ? Any info is greatly appreicated.



          log4j.logger.com.sun.jersey.api.container.filter.LoggingFilter=INFO, RESTService


          #requests to serve a log file

          log4j.logger.com.sun.jersey.api.container.filter.LoggingFilter.logFile=WARN, RESTService








          # Maximum file size and no: of back up files can be configured as per the production environment requirement