Log4J in a Pageflow

I am using Log4J in a pageflow, but no log messages are getting printed on the
weblogic console. Here is what I am doing -
In a Pageflow I have the following code
public static final String CLASS_ID = MyPageFlow.class.getName() + " - ";
private static Logger logger = Logger.getLogger(MyPageFlow.class.getName());
In the begin method I have -
logger.debug(CLASS_ID+"In Begin Action");
Then in my startWebLogic.cmd I have
set LOG4J=-Dlog4j.config=myconfig\log4j.properties
And I add this to the start line
Here is my log4j.properties file
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logs/myspt.log
log4j.appender.R.MaxFileSize=1000KB
log4j.appender.R.MaxBackupIndex=100
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
What could be wrong?
Thanks in advance.
Mark

workshop is using log4j,too, so the log4j config file have been loaded by
weblogic, you can modify %WLS_HOME%\common\lib\workshopLogCfg.xml
"Mark Dayer" <[email protected]> дÈëÓʼþ
news:3ff4dd49$[email protected]..
>
I am using Log4J in a pageflow, but no log messages are getting printed onthe
weblogic console. Here is what I am doing -
In a Pageflow I have the following code
public static final String CLASS_ID = MyPageFlow.class.getName() + " - ";
private static Logger logger =Logger.getLogger(MyPageFlow.class.getName());
>
In the begin method I have -
logger.debug(CLASS_ID+"In Begin Action");
Then in my startWebLogic.cmd I have
set LOG4J=-Dlog4j.config=myconfig\log4j.properties
And I add this to the start line
Here is my log4j.properties file
log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logs/myspt.log
log4j.appender.R.MaxFileSize=1000KB
log4j.appender.R.MaxBackupIndex=100
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
What could be wrong?
Thanks in advance.
Mark

Similar Messages

  • Logging pageflow - In a Hurry...please help :)

    Hi guys,
    I need to log messages from my pageflow into a log file.
    All my pageflows are inside a root package called pageFlows.
    my log4j.properties is specifying
    log4j.logger.pageFlows=debug, myLogger
    log4j.appender.myLogger=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.myLogger.DatePattern='.'yyyy-MM-dd
    log4j.appender.myLogger.File=C:/myLog.log
    log4j.appender.myLogger.Encoding=UTF-8
    log4j.appender.myLogger.layout=org.apache.log4j.PatternLayout
    log4j.appender.myLogger.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss,SSS} %5p [%t] (%c{1}) - %m%n
    I wouldn't like to use rootLogger, that I know that works. I have tested it. And also wouldn't like to change the workshopLogCfg.xml or, if have to change workshopLogCfg.xml I would like to do the smallest change possible in order to keep using my log4j.properties
    How can it be done without altering workshopLogCfg.xml?
    and
    How can it be done altering workshopLogCfg.xml to use my log4.properties?
    I know that to log on pageflows, the logger should be declared as transient, but now almost about to deploy to production this problem has been found and to update all pageflow Loggers to transient would impact in doing lots of regression tests that don't have time to be done.
    If I use rootLogger I receive the message log of pageflows, but also receive other undesired messages...so, is also possible to create some exclusion filter to avoid unwanted classes debug information?
    Edited by dfcastro at 12/11/2006 3:10 AM

    Thanks to everyone who answered my question.
    The solution was a servlet that loads up the lo4j.properties on startup using his init method.
    With that you don't need to declare the Loggers on pageflows as transient.

  • Log4j:WARN No appenders could be found

    We are using weblogic 10.0.1 and JDK 1.6.
    We are using Log4j for logging, if I pass -Dlog4j.configuration=log4jconfig.xml in the startup script as a command line parameter weblogic console is displaying following warning messages. However, system properly initializes Log4j properly.
    Looks like beehive loggers are not initialized properly. In our log4jconfig.xml we have added appender for org.apache.
    log4j:WARN No appenders could be found for logger (org.apache.beehive.netui.pageflow.internal.AdapterManager).
    log4j:WARN Please initialize the log4j system properly.
    Please advise

    I've the same problem on weblogic 10.0.
    When the application code calls commons LogFactory for the first time, I see the following error messages.
    log4j:WARN No appenders could be found for logger (com.xxx.TestClass).
    log4j:WARN Please initialize the log4j system properly.
    Can someone explain why the same config file/setup works with Weblogic 8.1 but not with Weblogic 10.
    Thanks
    Kambiz
    Here is my folder structure
    -webroot
    +
    +-WEB-INF
    +classes
    | |--log4j.properties
    +lib
    +commons-logging.jar
    +log4j-1.2.15.jar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Using Log4J in a Portal Application

    I am using Log4J in my portal app, but no log messages are getting printed. Here
    is what I am doing -
    In a Pageflow I have the following code
    public static final String CLASS_ID = MyPageFlow.class.getName() + " - ";
    private static Logger logger = Logger.getLogger(MyPageFlow.class.getName());
    In the begin method I have -
    logger.debug(CLASS_ID+"In Begin Action");
    Then in my startWebLogic.cmd I have
    set LOG4J=-Dlog4j.config=myconfig\log4j.properties
    And I add this to the start line
    Here is my log4j.properties file
    log4j.rootLogger=debug, stdout, R
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=logs/myspt.log
    log4j.appender.R.MaxFileSize=1000KB
    log4j.appender.R.MaxBackupIndex=100
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    What could be wrong?
    Thanks in advance.
    Mark

    After read some more forums i notice that i can´t place the dll's on java project, so i placed them on system32.
    Now i don't have any error of Native Library already loaded in another classloader, but i continue with the error UnsatisfiedLinkError: jni_init on line "if ((javacurl_handle = jni_init()) == 0)"
    Does anyone can help me?
    Thanks,
    Luis Cruz

  • Problem weblogic 9.2 with quartz and log4j : url-template-config.xml

    Hello,
    I configure a Servlet Quartz to run when WebLogic 9.2 starts, but i have an exception, here is my log :
    2009-04-15 11:52:52,424 ERROR Logger.error(): Exception while loading URL templates, /WEB-INF/url-template-config.xml
    Throwable: javax.servlet.ServletException: error: The document is not a url-template-config: document element namespace mismatch expected "" got "http://www.bea.com/servers/weblogic/url-template-config/8.0"
    Stack Trace:
    javax.servlet.ServletException: error: The document is not a url-template-config: document element namespace mismatch expected "" got "http://www.bea.com/servers/weblogic/url-template-config/8.0"
         at org.apache.beehive.netui.core.urltemplates.URLTemplatesFactory.getTemplates(URLTemplatesFactory.java:131)
         at org.apache.beehive.netui.core.urltemplates.URLTemplateDescriptor.load(URLTemplateDescriptor.java:133)
         at org.apache.beehive.netui.pageflow.PageFlowContextListener.performInitializations(PageFlowContextListener.java:102)
         at org.apache.beehive.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:120)
         at com.bea.console.internal.ConsoleActionServlet.init(ConsoleActionServlet.java:185)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:94)
         at weblogic.servlet.AsyncInitServlet.init(AsyncInitServlet.java:78)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
         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:68)
         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:493)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1688)
         at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1665)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1585)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2678)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:874)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:640)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:252)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:176)
         at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:347)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.activate(DeploymentAdapter.java:50)
         at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
         at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:168)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: org.apache.xmlbeans.XmlException: error: The document is not a url-template-config: document element namespace mismatch expected "" got "http://www.bea.com/servers/weblogic/url-template-config/8.0"
         at org.apache.xmlbeans.impl.store.Locale.verifyDocumentType(Locale.java:449)
         at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:354)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1270)
         at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1254)
         at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
         at org.apache.beehive.netui.core.urltemplates.schema.UrlTemplateConfigDocument$Factory.parse(Unknown Source)
         at org.apache.beehive.netui.core.urltemplates.DefaultURLTemplateFileParser.parse(DefaultURLTemplateFileParser.java:34)
         at org.apache.beehive.netui.core.urltemplates.URLTemplatesFactory.getTemplates(URLTemplatesFactory.java:118)
         ... 43 more
    The problem may be a conflict with the different version. My versions are quartz-1.6.0.jar, log4j-1.2.15.jar.
    When i rename the file url-template-config.xml i don't have this exception but just a log4j Warning but i don't know if it's not dangerous for my application (run with WebLogic 9.2) if i rename this file.
    Can you give me a solution to remove this exception or tell me if rename this file it's not dangerous ?
    Thank you,
    MH.

    url-template-config.xml is part of Apache Beehive. This file is used to provide a template mechanism for URL's. Is your application using Apache Beehive purposefully?
    http://beehive.apache.org/docs/1.0.2/netui/apidocs/javadoc/org/apache/beehive/netui/core/urls/URLRewriterService.html
    If not, you may have inadvertently added a reference to Apache Beehive when you created the application and now there are references to the Apache Beehive shared libraries in either weblogic-applicaiton.xml or weblogic.xml

  • What's best practice for logging messages in pageflow?

    What's best practice for logging messages in pageflow?
    Workshop complains when I try to use a Log4J logger by saying it's not serializable. Is there a context similar to JWSContext that you can get a logger from?
    There seems to be a big hole in the documentation on debug logging in workflows and JSP pages.
    thanks,
    Rodger...

    Make the configuration change in setDomainEnv.cmd. Find where the following variable is set:
    LOG4J_CONFIG_FILE
    and change it to your desired path.
    In your Global.app class, instantiate a static Logger like this:
    transient static Logger logger = Logger.getLogger(Global.class);
    You should be logging now as long as you have the categories and appenders configured properly in your log4j.xml file.

  • Simple PageFlow app deployment

    Hi all-
    I built a simple pageflow app with a single database control in WLW 8.1. I want
    to create a WAR file for deployment to a separate WLS 8.1 server, but the IDE
    doesn't seem to help much. So, I copied my web project to a separate directory,
    added my control.jar to WEB-INF/lib and went through several rounds of tweaking
    the web.xml and weblogic.xml files. I've created my WAR file several times and
    after several attempted deploy/test rounds, I'm frustrated. Here's what I've
    run into thus far:
    - Looks like a base WLS 8.1 domain doesn't properly include and initialize log4j
    - I now have log4j in my WEB-INF/lib, but I haven;t fixed it's config yet. Prior
    to including this, I received good ol' java.lang.NoClassDefFoundError on it.
    - Looks like a base WLS 8.1 domain doesn't include classes used by the page flow
    framework - I'm now stuck on another missing class - com.bea.wlw.runtime.core.dispatcher.AppManager$ReployCallback.
    The "wlw" in the name makes me think there's some kind of Workshop dependency
    here.
    So - is what I'm attempting simply unsupported? Must I deploy my app in production
    to a domain with the workshop extensions?
    Thx for any help.
    Regards,
    R

    Rick,
    Applications built using Workshop need to be deployed on a Workshop enabled
    server. the IDE helps you in generating an EAR file which can be deployed on
    a Workshop enabled server running either in production mode or development
    mode.
    The following document has more information on deploying to Workshop built
    apps.
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/deployment/navDeploymentandClustering.html
    Hope this helps.
    Regards,
    Raj Alagumalai
    Backline Workshop Support
    "Rick Robinson" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi all-
    I built a simple pageflow app with a single database control in WLW 8.1.I want
    to create a WAR file for deployment to a separate WLS 8.1 server, but theIDE
    doesn't seem to help much. So, I copied my web project to a separatedirectory,
    added my control.jar to WEB-INF/lib and went through several rounds oftweaking
    the web.xml and weblogic.xml files. I've created my WAR file severaltimes and
    after several attempted deploy/test rounds, I'm frustrated. Here's whatI've
    run into thus far:
    - Looks like a base WLS 8.1 domain doesn't properly include and initializelog4j
    - I now have log4j in my WEB-INF/lib, but I haven;t fixed it's config yet.Prior
    to including this, I received good ol' java.lang.NoClassDefFoundError onit.
    - Looks like a base WLS 8.1 domain doesn't include classes used by thepage flow
    framework - I'm now stuck on another missing class -com.bea.wlw.runtime.core.dispatcher.AppManager$ReployCallback.
    The "wlw" in the name makes me think there's some kind of Workshopdependency
    here.
    So - is what I'm attempting simply unsupported? Must I deploy my app inproduction
    to a domain with the workshop extensions?
    Thx for any help.
    Regards,
    R

  • PageFlow Context

    Hi all,
    This code inside the pageflow is not working .
    why ??
    * @common:context
    private ControlContext context;
    This done inorder to use the logger from context.
    I mean to use
    context.getLogger();
    Any ideas,
    Karthi.

    Neil,
    If its not possbile then how can we get Logger inside the Page flow.
    We want to use the Log4j configuration of the workshop.
    How the same will work under production environment.?
    What is recommended way to Log from pageflow.?
    Thanks,
    Karthi.
    "Eddie O'Neil" <[email protected]> wrote in message
    news:[email protected]..
    Karthi--
    Page Flows don't support the notion of the ControlContext as controlsdo. This is only supported
    inside of the control container.
    It's just not usable in a JPF in 8.1.
    Hope that helps...
    Eddie
    Karthi wrote:
    Hi all,
    This code inside the pageflow is not working .
    why ??
    * @common:context
    private ControlContext context;
    This done inorder to use the logger from context.
    I mean to use
    context.getLogger();
    Any ideas,
    Karthi.

  • How to use one pageflow to cater for multiple display?

    Hi, I trying to use one pageflow to display different kind of contents because the logic behind the retrieval is similar except that different parameter(string) us passed in for different content retrieval.
    How do i achieve the above? thanks in advance :D
    Cheers

    What do you mean by "display different kind of contents"? do you mean you want to display PDF/HTML/Image based on certain parameters or You are using different media like PC/PDA etc.
    In both cases you can redirect to different success page based on your query parameters.
    if(param.equals(image))
    forward image.jsp
    if(param.equals(pdf))
    forward pdf.jsp
    else
    forward html.jsp
    Hope it helps

  • What causes redirection to another page on pageflow action?

    Hi,
    we are developing an enterprise web application on WLP 10.3 using Page Flow portlets. There's a requirement that users should be able to run the application simultaneously in multiple browser windows sharing the same session and we have noticed strange behaviour when implementing this. Somehow the browser is always directed to latest visited page when any page flow action in any portlet is run, and we haven't been able to figure out what is causing this.
    Here's a more detailed description of the problem:
    1. User is looking at page X which has e.g. some form with a save button in browser window A
    2. User opens page Y in another browser window B
    3. User goes back to window A and clicks the save button, which causes a page flow action
    4. Now in window A, instead of showing the saved form on page X, page Y is shown
    First I thought the solution was to change the Page Flow Action method's annotations so that instead of using navigateTo=Jpf.NavigateTo.currentPage we would use direct path to the jsp. But that didn't help. And I think there are cases when we must use Jpf.NavigateTo.currentPage, e.g. for validationErrorForward. Most of our actions have ActionOutputs, which might also cause difficulties.
    Is it possible to add ActionOutputs into validationErrorForward if it would be annotated with direct path to jsp instead of currentPage? Can we somehow alter the currentPage or previousPage programmatically before the page is rendered, maybe by overriding something in the portlet's PageFlowController? We would need to do this to make e.g. some kind of map of currentPages for each used browser window.
    Any help or ideas would be greatly appreciated, thank you!
    --Markus                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi again, and thank you for all the answers.
    Finally I managed to make it work, or at least so it seems. The answers helped me to try a solution, where I create PageFlow event handlers for every action and define "Activate Page" for each action.
    Here's an example of a required handler using the Portlet Event Handlers -wizard:
    1. Add Handler... -> Handle PageFlow Event
    2. Uncheck "Only if displayed"
    3. Listen to: This
    4. Action: **save
    5. Add Action... -> Activate Page
    **(or search, begin, etc.)
    This is repeated for every action in every portlet, when we want to stay on the page. So this means a little bit of overhead work to spend on wizard clicking, but it's acceptable. Hopefully there won't be any unexpected cases to cause the navigation to fail.
    About the validationError handling, the solution to forward to another action that does the ActionOutput initialization hadn't occurred to me, it works perfectly, thanks. Also had to define Activate Page event handler for this new initialization action, too.
    --Markus                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to open new window without loosing pageFlow context?

    I am using 8.1 SP 3.
    Here is what I need to do. I have a an anchor link in a jsp that needs to open a new window after executing an action in a page flow. That action forwards to a jsp that needs to be able to access pageFlow variables.
    So, I have the following:
    <netui:anchor target="_blank" action="timesheetSubmitView">
    Everything works fine, that is it opens a new window and keeps the pageFlow content, BUT the new window contains all of the portlets that were on the original page. What I need is a new window that just contains the jsp that my action forwards to.
    I looked through the various topics on this forum, but the recomended approach posted by someone to enable redirect does not work because weblogic is loosing the pageFlow context, so jsp errors out due to the fact that variable on a pageFlow is null.

    I had the same issue. A couple different things to try -
    1. There is a property called redirect in the action. Set it to true.
    That did not work for me, so I just used pageFlow variables and put things into the session. Bad way of doing it, but works :)
    In the action that loads the first JSP, put things into the session. Then in the timesheetSubmitView action get the stuff from the session.
    Write an onDestroy method that deletes the session stuff, when u are done with it.

  • File not found error with log4j.properties

    Hi,
    I'm writing a web service on weblogic 8.1 with weblogic workshop.I have to use log4j-1.2.7 supplied by client with my application.I cannot write ant script manually.Also I cannot change server start script or cannot put any command line argument when the server starts.
    Now I require this logger in my EJB.I have kept log4j.properties in the same path where my EJB's are.But the final ear produced does not contain this log4j.properties and subsequently I get the error "log4j:ERROR Could not read configuration file [log4j.properties]."
    Please help me to resolve this problem so that log4j.properties goes with the final .ear file and the ejb code finds the logger.
    thanks,
    pratim

    Hello,
    I am having a similar problem. Did you find a solution?
    Thank you,
    Melissa
    "arunak" <[email protected]> wrote:
    >
    Hi Pratim,
    I am also facing the same problem. can u please let me know whenever
    u get the
    solution for this.
    Regards,
    Arunak
    Pratim <[email protected]> wrote:
    Hi,
    I'm writing a web service on weblogic 8.1 with weblogic workshop.Ihave
    to use log4j-1.2.7 supplied by client with my application.I cannot write
    ant script manually.Also I cannot change server start script or cannot
    put any command line argument when the server starts.
    Now I require this logger in my EJB.I have kept log4j.properties inthe
    same path where my EJB's are.But the final ear produced does not contain
    this log4j.properties and subsequently I get the error "log4j:ERROR
    Could not read configuration file [log4j.properties]."
    Please help me to resolve this problem so that log4j.properties goes
    with the final .ear file and the ejb code finds the logger.
    thanks,
    pratim

  • How to make TIME_STAMP as file name in log4j

    How can i make a time stamp as a file name when log4j make a file?
    eg:
    <param name="File" value="'HH-mm-ss-SSS'".log />is there any feature available.
    ThankQ
    Han

    For this behaviour you're looking at a javascript ...
    For dumb population then use Batch Processing inside Acrobat ..
    Jon

  • Configure log4j to write to different log files conditionally

    Hi folks,
    Is there is way log4j could be configured to write to multiple log files conditionally? Let me try to explain what i am trying to do.
    I have two classes DatabaseChecker and FTPChecker extends Checker class. Within Checker class, there is a method logTestResult(CheckerType c, boolean isFailed, int retry, int isMaxRetryExceeded). Depending on the CheckerType(database or FTP), I need to write log outputs to different files (dbchecker.log or ftpchecker.log). How do i configure log4j to do this?
    I've seen how to configure log4j based on classes from different package, but not sure on this one. Any clue would be much appreciated.

    lgmqy2000 wrote:
    I have two classes DatabaseChecker and FTPChecker extends Checker class. Within Checker class, there is a method logTestResult(CheckerType c, boolean isFailed, int retry, int isMaxRetryExceeded). Depending on the CheckerType(database or FTP), I need to write log outputs to different files (dbchecker.log or ftpchecker.log). How do i configure log4j to do this?
    if (checker.isType(CheckerType.DATABASE)) {
        dbLogger.info(someMessage);
    } else if (checker.isType(CheckerType.FTP)) {
        ftpLogger.info(someMessage);
    } else {
        defaultLogger.info(someMessage);
    }~

  • MDB Container Managed Transaction and Log4J

    Hi,
    I'm programming and MDB that reads and updates a database then sends out an HTTP Post and logs using log4j. I've read that when an MDB is configured as CMT or container managed transaction and the OnMessage method executes without errors, the transaction is implicitly commited. You can rollback the transaction by explicitly calling setRollbackOnly() or when a RuntimeException has been thrown. My worry is that after I have sent out an HTTP POST (a transaction has been completed) I would have to log a transaction completion using log4j. My problems is if log4j throws a RuntimeException thereby rolling back my transaction which shouldn't be the case. What I have done is to catch all Exceptions (and swallow them) whenever I log using log4j after I have sent out an HTTP POST succesfully (since my transaction should be complete by then). Is this a correct workaround?
    Thanks :)

    Your approach is correct. If you think, Log4J might throw errors, swallow the exceptions and try not to roll back.

Maybe you are looking for

  • How do I get my iTunes to reference an external hard drive folder?

    I don't want to put all of my music on my laptop. I would like iTunes to reference my external hard drive iTunes folder for my music rather than the default folder on my computer. I have tried to change the iTunes Media folder to my "iTunes - Externa

  • Smart View Error "OLAP_error (1020013)..."

    Good Morning, My client has Hyperion version 11, and is leveraging Smart View for reporting. Upon attempting to retrieve a report, the following error message was displayed, and the report was not retrieved: "OLAP_error (1020013): The resultant repor

  • Attaching PDF to FB02

    Hi I am trying to write an ABAP program for uploading a PDF document from a smartform to SAP document in FB02 in background without any user dialog. I am using the following FMs in sequence: 1. SSF_FUNCTION_MODULE_NAME & calling the Smartform FM enab

  • Buy Lightroom 4 or wait for 5?

    I'm nearing the end of my 30-day trial of Lightroom 4. I'm essentially sold. I recently became aware that Lightroom 5 is coming out shortly, and downloaded it too. I'm reluctant to pay the full price for 4 (yes, I'm aware of the current $99 special)

  • Imovie same person in one shot help

    Hello, so i'm kinda new to imovie and all of the video editing stuff but i want to do a video where i'm in the same scene at the same time dressed as different people where you can here and see all of the different versions of me at the same moment.