WMM CMR implementation and log4j issue - Websphere

This is a discussion on WMM CMR implementation and log4j issue - Websphere ; Hi, We are having a WMM Custom Member Repository implementation code that uses log4j library for logging. The logger logs for a little while when the server is started and it stops logging. We have both stdout and a file ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: WMM CMR implementation and log4j issue

  1. WMM CMR implementation and log4j issue

    Hi,



    We are having a WMM Custom Member Repository implementation code that uses log4j library for logging.

    The logger logs for a little while when the server is started and it stops logging. We have both stdout and a file appenders in use.

    We are seeing the following error in SystemError.log



    WebSphere Portal Version: 5.1



    log4j version: 1.2.8

    SystemErr.log
    ==============
     
    [6/10/08 15:56:55:306 EDT] 8dfe930 SystemErr R log4j:ERROR Could not instantiate appender named "stdout" .
    [6/10/08 15:56:55:306 EDT] 8dfe930 SystemErr R log4j:ERROR A "org.apache.log4j.DailyRollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
    [6/10/08 15:56:55:306 EDT] 8dfe930 SystemErr R log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
    [6/10/08 15:56:55:306 EDT] 8dfe930 SystemErr R log4j:ERROR [com.ibm.ws.bootstrap.ExtClassLoader@8c36930] whereas object of type
    [6/10/08 15:56:55:307 EDT] 8dfe930 SystemErr R log4j:ERROR "org.apache.log4j.DailyRollingFileAppender" was loaded by [com.ibm.ws.classloader.ExtJarClassLoader@db7a931]
     
     
     
    Log4j file used for this :
    =========================
    log4j.rootCategory=DEBUG,stdout,drfa
    #STD
    log4j.appender.stdout=org.apache.log4j.ConsoleAppe nder
    log4j.appender.stdout.layout=org.apache.log4j.Patt ernLayout
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
     
    # for DAILYROLLINGFILEAPPENDER
    log4j.appender.drfa=org.apache.log4j.DailyRollingF ileAppender
    log4j.appender.drfa.File=/var/log/wmm.log
    log4j.appender.drfa.layout=org.apache.log4j.Patter nLayout
    log4j.appender.drfa.layout.ConversionPattern=%d %-5p [%t] %C { 2 } - %m%n
    log4j.appender.drfa.datePattern= '.' yyyy-MM-dd




    We also have a log4j configuration inside wps.ear.





    Any help would be appreciated.

  2. Re: WMM CMR implementation and log4j issue

    Note:




    The cmr implementation jar is kept in /opt/WebShphere/Appserver/lib/ folder and it is not loaded by the app class loader.



    I have noticed that the cmr was logging ok to the log file during the portal server startup and until the server starts loading the portal applications. When the server starts loading apps, it throws the above error in the SystemErr.log file.


    I have set the server's class loader policy to both "PARENT_LAST" and "PARENT_FIRST" and found no difference.

  3. Re: WMM CMR implementation and log4j issue

    are you running any struts apps on the portal?

    Jim




    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  4. Re: WMM CMR implementation and log4j issue

    In answer to the question about Struts app in the Portal instance...the answer is YES. Our application is NOT a web app however and is a WWM-CMR implmentaton that is installed directly at: /opt/WebShphere/Appserver/lib/.

  5. Re: WMM CMR implementation and log4j issue

    Yes. We have several struts apps running as portal applications(inside ear).



    This is a Custom Member Repository implementation code and this code lives in the ../appserver/lib/ directory.



    Thanks

  6. Re: WMM CMR implementation and log4j issue

    ok one of the things is to check the struts versions because the SPF used to behave badly and override system settings





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  7. Re: WMM CMR implementation and log4j issue

    Our apps use Struts Version 1.1.

  8. Re: WMM CMR implementation and log4j issue

    sorry I meant versions of the struts portal framework, if you look in the jars in the struts apps you will see version.txt that lists this





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  9. Re: WMM CMR implementation and log4j issue

    Sorry, No, we don't use the SPF. But we do have the default IBM portlets installed. Here is the version info for that:



    VersionInfo.getLevel(): wp.510, wp510, legacy

    VersionInfo.getStrutsPortletFrameworkVersion(): 5.1.0.0

    VersionInfo.getStrutsVersion(): 1.1


    Thanks

  10. Re: WMM CMR implementation and log4j issue

    We'll continue to pursue this issue via the PMR that you opened with IBM support yesterday.

  11. Re: WMM CMR implementation and log4j issue

    Yes...this has become a real nightmare for us and really confusing. On one hand we understand that, supposedly,

    WAS 5.1 does not support log4j - http://www.ibm.com/developerworks/we...2_supauth.html .



    However in an out-of-the-box install of WPS 5.1 (w/ WAS 5.1) we find this:



    portal510:/opt/WebSphere/PortalServer/shared/app # ll log*

    -rwxrwxrwx 1 root bin 350677 Mar 11 2004 log4j-1.2.7.jar

    portal510:/opt/WebSphere/PortalServer/shared/app #



    OUR issue is a a new JAR file that has been installed in /WebSphere/AppServer/lib (containing an implemenataion of a custom member repository) which is using log4j, works until the WebSphere_Portal server completely comes up (ready for e-business) and then all the logging that was working (messages were successfully shown during startup where the credentials are passed to the startServer.sh script), just stops - and there are all these exceptions thrown in SystemErr.log regarding Log4j classes. The Portal works and the CMR implementation works (you can login) - but any log4j calls that trace that auth activity never show up and the SystemErr.log file is full of exceptions.

+ Reply to Thread