Logging using Log4J

Hi,
I want to use Log4J to write to the sap log using a Log4J appender. I followed the tutorial from https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/36085e78-0801-0010-678d-8b4e89ddff3c
but i doesnt work for me. When i check the ear which is deployed to the server, i cant find my log4j.properties file anywhere...i guess that is the problem. I put it in the src folder...i thought it was the correct place, but it doesnt show up in the ear...can anyone help me out?
Much thanks,
Hugo Hendriks

Please don't crosspost. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.

Similar Messages

  • Unable to Generate Logs using Log4j

    Hi All,
    I have a task where i have configure weblogic to generate the logs using log4j instead of the default jdk,
    I changed the logging level implementation in admin server from jdk to log4j
    Then i created a log4j.xml and placed it in the root folder of the domain.
    But the adminserver.log file still shows the logs from default jdk the log4j changes tht i did had no effect on the logs.
    Kindly Help
    Thanks
    Mukul

    Hi ,
    I dont have any log4j.properties defined . Should i define a custom log4j.properties.
    This is how my log4j.xml is :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration>
    <appender name="FILE" class="org.apache.log4j.FileAppender">
    <param name="File" value="myApp.log"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d{ISO8601} %t %-5p %c{2} - %m%n"/>
    </layout>
    </appender>
    <logger name="org.apache">
    <level value="WARN"/>
    </logger>
    <logger name="org.springframework">
    <level value="WARN"/>
    </logger>
    <root>
    <level value="DEBUG"/>
    <appender-ref ref="FILE"/>
    </root>
    </log4j:configuration>
    But this is generating a custom log4j log file but we want the weblogic generated adminserver.log to be generated using the log4j instead of jdk

  • Error in Logging using log4j When deployed in weblogic server

    I have deployed an SOAP based web service application as an war file and used log4j propertiers to do application logging .When i tested the application through a JAVA client the log4j log file has all the application log information but when i deployed it in the weblogic server 10.3.3 and tested it through SOAP UI it gives me just "Run time error exception" in the log4j log file(which is returned in the SOAP response) as against the application logs which i need. I have also added <wls:package-name>org.apache.log4j.*</wls:package-name> in the weblogic.xml and also changwed the logging to the log4j logging in the server ( which was perviously JDK logging) .But still it is not returning the complete application error stack trace in the log4j log file(and also in the weblogic command console) I need to get the application error stack trace in the log4j log file ( and also in the console) so it would be easy to debug the code.
    Please help me out in doing the same.
    thanks in advance

    Noman,
    have you checked that the folder D:\OracleJeveloper\Middleware\jdk160_14_R27.6.5-32 contains the jre?
    Timo

  • Logging using Log4j and JMS

    Hello All,
    I am writing an web application. I am working on logging the application messages asynchronously using JMS. And Log4j for writing the messages.
    I need help with following 2 things
    1) example showing how to create/use JMSAppender
    2) Sending messages to JMS Queue
    I am sorry, if you think I have posted the message in inapplicable category.
    But since its and web application, I found this thread as better choice :)
    Thanks and any help Appreciated !

    Hello All,
    I am writing an web application. I am working on logging the application messages asynchronously using JMS. And Log4j for writing the messages.
    I need help with following 2 things
    1) example showing how to create/use JMSAppender
    2) Sending messages to JMS Queue
    I am sorry, if you think I have posted the message in inapplicable category.
    But since its and web application, I found this thread as better choice :)
    Thanks and any help Appreciated !

  • How to implement custom logging using log4j in Webcenter Portal Application

    I need to implement custom logging and export it to a new log file in Oracle 11.1.1.5 (Webcenter portal application). Please tell me the steps to implement this functionality.

    Please post questions for WebCenter Portal in it's own forum:
    WebCenter Portal

  • Application specific logging with Log4j on weblogic 8.1

    Hi,
    For a few days now, I have been trying to implement application specific logging using Log4j (1.2.x) for my 3 applications running on the same server (8.1.6). All three application war files are generated from same source. I followed the example of Jboss in setting up the Hierarchy for logging using RepositorySelector. In my case Java class which implements RepositorySelector is loaded through ServletContextListener from jar file placed in WEB_INF/lib folder and log4j.properties file is in WEB-INF folder of each application.
    Independent logging of each application takes place correctly, if the applications are deployed from console. However logging fails if weblogic is shutdown and restarted, in this case logging takes place from 2 classes only implementing filters of each application. Logging from other classes is not taking place. I am spinning my wheels on this and can't seem to figure out what the issue is.
    Thanks for any help...below is the snippet of code
    Sohan
    public static synchronized void init(ServletContext config, String strLogProperties, String webAppName)
    throws ServletException {
    if( !initialized ) // set the global RepositorySelector
    defaultRepository = LogManager.getLoggerRepository();
    RepositorySelector theSelector = new MyRepositorySelector();
    LogManager.setRepositorySelector(theSelector, guard);
    initialized = true;
    Hierarchy hierarchy = new Hierarchy(new RootCategory(Level.DEBUG));
    loadLog4JConfig(config, hierarchy, strLogProperties, webAppName);
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
    repositories.put(loader, hierarchy);
    config.setAttribute("hierarchy", hierarchy );
    public LoggerRepository getLoggerRepository() {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();
    LoggerRepository repository = (LoggerRepository)repositories.get(loader);
    if (repository == null) {
    return defaultRepository;
    } else {
    return repository;
    public void LogInit(ServletContext ctx) throws ServletException {
    System.out.println("\n\n---------------Log4jInit---------------\n\n");
    String strLogProperties = ctx.getInitParameter("Log4JProperties");
    System.out.println("Log4j properties " + strLogProperties);
    String webAppName = ctx.getInitParameter("LogFileName");
    System.out.println("App log File name " + webAppName);
    if (webAppName == null ) {
    webAppName = getWebAppName(ctx);
    System.out.println("Application name = " + webAppName);
    MyRepositorySelector.init(ctx, strLogProperties, webAppName);
    LOG = Logger.getLogger(this.getClass());
    LOG.info("Log message from Log4jInit ServletContextListener");
    System.out.println("\n\n---------------Log4jInit: Complete---------------\n\n");
    }

    Has anyone been able to get around the "Export of object xxx barred" error when
    trying to access the object?
    Thanks,
    Kevin
    "Koua" <[email protected]> wrote:
    >
    I have the same problem when adding listener for COM events. I think
    it's a bug
    in Weblogic. It seems that no one can help.
    Teresa Canales <[email protected]> wrote:
    Hi,
    I am getting the following error. I am not sure how to fix this. I
    looked in everywhere on the admin console and couldn't find anything.
    The following is what I am getting....
    BEA-210000 Apr 14, 2004 11:05:42 AM EDT servicelayertrain
    Error COM Export of object: com.symphonyhealth.user.facade.ejb.User_eecm3e_HomeImpl@2ba3e4
    barred
    Any help would be greatly appreciated.
    Teresa

  • Need Some Help in Using Log4j for logging

    Hi
    I am using Log4j for logging in my application . i have problem some areas .
    I want to rotate my file on basis of Time. means if my log file name format is HH:MM then after every minute new log file should be created , i am using Size based rotation its working fine.
    Plz Tell me which propety i used to set my logfile name like DATeFormat
    i tried with this Property but failed
    log4j.appender.R.File=%d{HH:MM}
    Simlarly i dont want to bound BackupSize
    log4j.appender.R.MaxBackupIndex=1000
    i want that suppose after 2 Mb automatically start new file and there is no upper bound on that
    how can i do that or from where i can see all properties of Log4j Thanks

    Thanks
    But in this case i cannot do Size based rotation
    These properties not belong to DialyRolling.. class
    log4j.appender.R.MaxFileSize=1KB
    log4j.appender.R.MaxBackupIndex=1000
    what i want is if file size grow with in one minute i create new file using RollingFileApender and if size doesnt grow in one minute and minute cross then next minute file should be created , how can i acheive both of these

  • How to create the log file in remote system using log4j.

    Hi,
    How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
    public class Logging
    Logger log=null;
    FileAppender fileapp=null;
    public Logging(String classname)
    try
    log = Logger.getLogger(classname);
    String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
    fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
    log.addAppender(fileapp);
    log.info("Logger initilized");
    }catch(Exception ex)
    ex.printStackTrace();
    java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
    at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Please help.
    Thanks in advance.
    Saravanan.K

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Multiple log files using Log4j

    Hello,
    I want to generate log files based on package structure. Like com.temp.test in test.log ,also I am having a log file at application like app.log .
    This is my requirement what has been logged in test.log should not be logged in app.log.This is my log4j.properties file.
    # Log4j configuration file.
    # Available levels are DEBUG, INFO, WARN, ERROR, FATAL
    # Default logger
    log4j.rootLogger=DEBUG, PFILE
    log4j.logger.com.temp.test=DEBUG,TEST
    # PFILE is the primary log file
    log4j.appender.PFILE=org.apache.log4j.RollingFileAppender
    log4j.appender.PFILE.File=./App.log
    log4j.appender.PFILE.MaxFileSize=5120KB
    log4j.appender.PFILE.MaxBackupIndex=10
    #log4j.appender.PFILE.Threshold=DEBUG
    log4j.appender.PFILE.layout=org.apache.log4j.PatternLayout
    log4j.appender.PFILE.layout.ConversionPattern=%p %d[%l][%C] %m%n
    #log4j.appender.PFILE.layout.ConversionPattern=%p %d %m%n
    log4j.appender.TEST=org.apache.log4j.RollingFileAppender
    log4j.appender.TEST.File=./test.log
    log4j.appender.TEST.MaxFileSize=5120KB
    log4j.appender.TEST.MaxBackupIndex=10
    log4j.appender.TEST.layout=org.apache.log4j.PatternLayout
    log4j.appender.TEST.layout.ConversionPattern=%p %d[%l][%C] %m%n
    Can u help me!!!

    You have to configure the temp logger so that it does not send its info on to the root logger.
    For this, you can use the additivity flag.
    # Default logger
    log4j.rootLogger=DEBUG, PFILE
    log4j.additivity.com.temp.test=false
    log4j.logger.com.temp.test=DEBUG,TESTThe rest of the file remains the same.

  • How to create outside Logging file in osb 11g using log4j.jar?

    Hi all,
    Currently, i am using osb 11g to develop a system. In the system we need to create a log file using log4j.jar library. This sub-program is working in the osb 10g base but fail to work in the osb 11g base. Can anyone give me some advice about this matter? Have anyone created one like this in 11g? Is it successful?

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Cant use log4j or commons logging with ease in OC4J/OAS 10g

    Hi,
    I have a simple JEE 5 app which just uses Log4J for logging. I have a log4j.properties at the right place. But deploying an EAR with this config fails
    Operation failed with error: Lorg/apache/log4j/Logger;
    or if i move to commons logging this...
    Operation failed with error: Lorg/apache/commons/logging/Log;
    Things as simple as using logging, I feel, shouldnt be any complex than what is inferred. Atleast there should more error detailing to it than a bozo message like the above.
    Anyone used logging in just a ejb jar app???

    We've run into this recently and were surprised to find out that Oracle not only "recommends" OAS over OC4J in a production environment, they require it. If you look at the license agreement that you accepted when you downloaded OC4J (you know, the thing that you never read) you'll find that Oracle expressly says that you are not allowed to use OC4J in anything other than a development environment.
    So, after years of using it for several applications, we now have to switch to OAS. Actually, we are doing this not only to stay legal, but also to take advantage of mod_oc4j for reverse proxy. We could not get this to work under OC4J so we started poking around with OAS and then found out that we were not licensed for either in production.
    If you are using OC4J in production, read the not-so-fine print. You are in violation of their license agreement.
    -Bruce Altner
    NASA HQ

  • Very weird issue with server logging when using log4j.properties file

    I'm using log4j logging. In log4j.properties the root logger is set up to use the ServerLoggingAppender class so that all our application logs go to the main server logfile. In addition, there are several appenders defined for specific components, with output going to specific per-component log files. Everything is going fine until I launch the server console. At this point all of those per-component log files get wiped out (zero length) and some non-ASCII lines are written to at least one of these files, after which the logs appear to be fine. The main server log file does not appear to be affected (because the root logger is set to "warn" level, while component-specific loggers are set to trace, the contents in these files is different; however I tried disabling all the other appenders and turning the root logger up to trace, and that still did not re-create the problem in the main server log file.
    And here's the really weird part -- if I use the same configuration, but in a log4j.xml file, the problem does not happen.

    Figured it out.
    We were passing in the configuration for log4j as -Dlog4j.configuration=file:/<properties file> and this was added to the command line for both the managed and admin servers. Problem is that the console app starts its own instance of log4j, and when it reads the configuration for the appenders it initializes or rolls over the files. At some point we have two JVMs accessing the same files, so some corruption is bound to happen.
    I'm not clear why the .xml file made a difference, but earlier we had been passing the log4j configuration as a jar file placed in the domain/lib folder, so perhaps the designer reverted to that (placed the log4j.xml file in a jar in lib, and not simply changed the -Dlog4j.configuration=file:/ option.

  • How to configure WL 10.3 to used log4j instead of jdk logging

    Hi,
    How can I configure WL 10.3 to use log4j instead of jdk default logging. I did changed the logging to log4j through the console for the AdminServer and one of the Managed Instance. I try to deploy axis2.war but it fails and complains about apache logger class not found. So wondering what other settings do I need. I even copied log4j-1.2.15.jar & wllog4j.jar in WL_DOMIAN\lib and restaretd the server but still gets the following error is
    'weblogic.application.ModuleException: [HTTP:101216]Servlet: "AxisServlet" failed to preload on startup in Web application: "axis".
    java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at weblogic.servlet.internal.WebComponentContributor.getNewInstance(WebComponentContributor.java:223)
         at weblogic.servlet.internal.WebComponentContributor.createServletInstance(WebComponentContributor.java:247)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:255)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1913)
         at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1887)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
         at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:40)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@70b01a for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@70b01a for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger))
         at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
         at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
         at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
         at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
         at org.apache.axis2.transport.http.AxisServlet.<clinit>(AxisServlet.java:83)
         ... 50 more
    Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@70b01a for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger)
         at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
         at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
         ... 54 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
         at java.lang.Class.getConstructor0(Class.java:2699)
         at java.lang.Class.getConstructor(Class.java:1657)
         at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
         ... 55 moreThanks

    Go to Environments >> servers>> adminServer >> logging >> advanced
    change the default JDK logging to log4j
    by default weblogic provides two types of logging JDK and log4j

  • Using log4j to create custom log level in standalone batch application

    Hi all,
    I would like to use Log4j to create a custom log level so that from my standalone java batch process application, whatever error messages I can log to a log file.
    Can any one give me any pointer on this.
    Appreciate any help.

    This doesn't seem to warrant a 'custom level'. Just use Log4J as is... create a Logger object and use its error() or warn() or whatever methods are appropriate for the logging you want to do. I don't understand the reason for the question.

  • Multiple deployed modules using log4j log to same file

    We have deployed two modules in ias 6.5 Solaris - moduleA and moduleB. Each of these modules uses log4j to write to a log file - logA and logB. Each module includes logj4.jar in it's WEB-INF/lib directory and the classes are unzipped upon deployment into an org/apache/log4j directory under each module.
    Upon app server startup, neither module is loaded. A request is sent to /NASApp/moduleA. logA is written to as the module is initialized. A request is then sent to /NASApp/moduleB. logB is written to as the module in initialized. A request is then sent to /NASApp/moduleA again. This request should be logged in logA but is instead written to logB.
    This happened in ias 6.0 sp3 as well as ias 6.5.
    An attempt to determine the source of the problem:
    The /APPS/modules/moduleB/WEB-INF/lib/org/apache/log4j directory was removed. This should cause ClassNotFoundExceptions to be thrown when attempts are made to write to log4j from moduleB. The appserver is first stopped, then killed, then started again - neither module is loaded. A request is sent to /NASApp/moduleA. logA is written to as the module is initialized. A request is then sent to /NASApp/moduleB - a request that should result in ClassNotFoundExceptions being thrown because the log4j classes are no longer present in the module's classpath. Instead, logB is written and everything behaves as was described above.
    Based on this test, we believe that the root of this problem is once again a class loader issue. Apparently, the log4j classes are being loaded by a class loader that is shared between both moduleA and moduleB. Normally this would not cause a problem, but in the case of log4j, the target log file is being overwritten and causes the log entries to be shared between the two modules.
    What must we do to remedy this problem? At present, the only fix we know will work is to run a separate appserver instance for each module - a solution that is not acceptable due to the amount of resources consumed by all of the deployed code.

    Hi,
    You are correct it is a classloader problem, in sp4/6.5 you have a separate classloader for each module (war/jar) but all the helping classes inside modules share a single classloader, that's why even after deleting the helping files from ModuleB it was working.
    The remedy to your problem is to create ear module out of those ModuleA and ModuleB and put the helping jar files in both of the ear modules. For ias an ear file is an J2EE application and a separate classloader instance is dedicated to it, it holds true for all the helping classes in the ear module too and the helping classes in two J2EE application (ear module) no longer share the classloader.
    I hope it will solve your problem. For further information regarding classloaders please visit Classloader runtime hierarchy.
    Please feel free to ask further questions.
    Sanjeev,
    Developer Support, Sun ONE Application Server-India.

Maybe you are looking for