Using log4j with studio

All,
I was able to get the log4j working with BPM in Weblogic environment. However I am running into some issue truing to get that done in studio.
In Weblogic Env. I place the log4j.properties file under in a folder called resources under the Domain Root and the java code is able to read the file.
I am not sure what should be the equivalent of Domain Root in the studio env. I tried to create a file and it gets created under "C:\OraBPMStudioHome\eclipse" in my installation. I tried to create a log file under the logs directory @ the same location and it works file .
Unfortunately I am not able to read the log4j.properties if i keep it @ this same location.
in my Java code I read the file as this
private static final String DEFAULT_PATH = "resources/log4j.properties";
My question is to all you gurus out there , how can i make it work in studio. Do i have to setup something special to get this working in studio.
-Thanks

I was wondering if someone has faced this issue and knows how to resolve this.
-Thanks

Similar Messages

  • Using log4j with portal server

    Hi,
    I am trying to use log4j with Portal server 6.1 using log taglibs from jakarta.
    Here is what i've done:
    1. copy taglibs-log.jar in /etc/opt/SUNWps/desktop/classes
    2. copy taglibs-log.tld in /etc/opt/SUNWps/desktop/default/tld
    3. put log statements in JSPs
    for example:
    <log:debug>This is body content.</log:debug>
    <log:debug message="This is attribute content." />
    4. /etc/opt/SUNWps/desktop/classes/log4j.properties contains
    =========================================
    # Sample properties to initialise log4j
    log4j.rootCategory=debug, stdout, R
    #log4j.rootCategory=debug, stdout
    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=logtags.log
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=2
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    ===============================================
    However no log file is created on my system. I am very new to this and would appreciate if anyone could tell me what more needs to be done to get log records in a file.
    Thanks for all your help.
    Kind regards,
    Apoorv

    Hi,
    I am trying to use log4j with Portal server 6.1 using
    log taglibs from jakarta.
    Here is what i've done:
    1. copy taglibs-log.jar in
    /etc/opt/SUNWps/desktop/classes
    2. copy taglibs-log.tld in
    /etc/opt/SUNWps/desktop/default/tld
    3. put log statements in JSPs
    for example:
    <log:debug>This is body content.</log:debug>
    <log:debug message="This is attribute content." />
    4. /etc/opt/SUNWps/desktop/classes/log4j.properties
    contains
    =========================================
    # Sample properties to initialise log4j
    log4j.rootCategory=debug, stdout, R
    #log4j.rootCategory=debug, stdout
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternL
    ayout
    # 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=logtags.log
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=2
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c -
    %m%n
    ===============================================
    However no log file is created on my system. I am
    very new to this and would appreciate if anyone could
    tell me what more needs to be done to get log records
    in a file.
    Thanks for all your help.
    Kind regards,
    Apoorv

  • Can I use log4j with a java stored procedure

    I have code that resides on the middle tier and on the database. Our company is using log4j for debugging purposes. In order to get my code to work on the database, I have had to remove all the log4j stuff. Has anyone tried to get code that has log4j messages to run on the database? I am not concerned with actual debugging, I just don't want to have to strip this code out if I can avoid it.

    Hi Laura,
    As far as I know, you have two choices:
    1. Load the log4j classes into the database (using the "loadjava" tool).
    2. Enable remote invocation of log4j classes via RMI (or similar).
    Hope this helps.
    Good Luck,
    Avi.

  • Using log4j with JavaFX and Netbeans 6.8

    Hello,
    I'm trying to use log4j within a JavaFX project using NetBeans 6.8.
    I've donwloaded the .zip file from the Apache website and added the log4j-1.2.16.jar to the project's libraries.
    Then I added the imports:
    import org.apache.log4j.Logger;
    import org.apache.log4j.BasicConfigurator;But using the Logger class does not work:
    def log:Logger = Logger.getLogger("MyApp.class");NetBeans says 'cannot find symbol'
    When I'm doing the same things within a Java project, everything works fine.
    What am I doing wrong?
    thanks
    Edited by: Lichti on Apr 17, 2010 12:08 PM

    To answer my own question ... there's a known bug in NB 6.8 with including JARs.

  • Using Log4j with Listener

    We are using Log4j and all of our logging files are properly created by a
    listener that starts once our application is deployed. All logging works
    fine when we are running in single server mode but when we deploy the EAR to
    a cluster, the listener starts and we see the log files created and there is
    an initial line written into one of the created log files by the listener.
    When we access our application on the cluster non of the logging messages
    are written out to the files. I am thinking that maybe the listener is
    dieing but I am not sure. We have a log4j config file that is included in
    our WEB-INF directory.
    Is there a way to see what listeners are running?
    Has anyone used log4j in a clustered environment?
    Thanks
    Michelle

    We have managed to get a little further. When the managed servers are
              started up by the admin server, and application is deployed, the log files
              are created by the listener BUT when we access the application nothing is
              written to the logs. We have not located any exceptions, the logs just
              don't seem to get written to. Now, if redeploy the application it properly
              logs to the log files. Any ideas??? Again, our log4j config file is in
              the WEB-INF directory in the EAR and the web.xml has an entry for
              log4j-init-file pointing to the WEB-INF log4j file. We have deployed our
              application to production and I just don't like the fact that if the servers
              must be rebooted that our application must be redeployed. If this step is
              missed then we won't be logging and of course troubleshooting goes out the
              window. Any help greatly appreciated
              I will have to double check if we have a try catch block. If not I will do
              this pronto.
              <Srinagesh Susarla> wrote in message news:[email protected]..
              > log4j should work the same both on single server as well as clustered env.
              > Can you try adding some debug to your listener to ensure that its getting
              > initialized correctly. Also can you surround it with a try catch block to
              > ensure that its getting loaded correctly.
              > Another question: Is this a ServletContextListener or an
              > ApplifecycleListener?
              > If there are any exceptions please post them here.
              >
              > -- Nagesh

  • Using log4j with WLS7.0 SP2

    Hello,
    I'm trying to start using log4j. It seems to work fine initially after the
    server starts up. But if I make a modification to any of the logged classes
    and recompile them, log4j errors out saying it cannot find an appender for
    the category specified. log4j.jar is in the classpath of the WLS startup
    script. Has anyone come across this problem? I'm not quite sure what the
    source of problem is. And it is not really productive to restart the server
    every time anything changes in one class...any insight is appreciated!
    Thank you,
    Makoto

    Oops. I solved my own problem. I turned off "Prefer WEB-INF classes" in the
    console and the problem went away.
    mk.
    "Makoto Suzuki" <[email protected]> wrote in message
    news:3f034462$[email protected]..
    Hello,
    I'm trying to start using log4j. It seems to work fine initially after the
    server starts up. But if I make a modification to any of the loggedclasses
    and recompile them, log4j errors out saying it cannot find an appender for
    the category specified. log4j.jar is in the classpath of the WLS startup
    script. Has anyone come across this problem? I'm not quite sure what the
    source of problem is. And it is not really productive to restart theserver
    every time anything changes in one class...any insight is appreciated!
    Thank you,
    Makoto

  • Problem in Using Log4J with Weblogic 9.2

    I am using Weblogic 9.2 and Log4j.
    By using Admin console I set the Severity Level to WARNING and inside my java code is given below:
    Logger logger = Log4jLoggingHelper.getLog4jServerLogger();
    if (logger.isEnabledFor(Priority.DEBUG)){
    logger.debug("DEBUG - Test Debug message");
    logger.info("DEBUG - Test Info Message");
    logger.warn("DEBUG - Test Warning Message");
    logger.error("DEBUG - Test Error Message");
    logger.fatal("DEBUG - Test Fatal Message");          
    Somehow the logger.isEnabledFor(Priority.DEBUG) returning 'TRUE' and the follwoing message is displayed.
    <Nov 29, 2006 2:44:04 PM EST> <Warning> org.apache.log4j.Category> <000000> <DEBUG - Test Warning Message>
    <Nov 29, 2006 2:44:04 PM EST> <Error> <org.apache.log4j.Category> <000000> <DEBUG - Test Error Message>
    <Nov 29, 2006 2:44:04 PM EST> <Info> <org.apache.log4j.Category> <000000> <DEBUG - Test Fatal Message>
    <b><i>NOTE - The logger.debug() and logger.info() methods are not invoked because of the severity level to 'WARNING' in the console.</i></b>
    <b>I would like to know why the Somehow the logger.isEnabledFor(Priority.DEBUG) is having a value of 'TRUE'.</b>
    I expected only the Somehow the logger.isEnabledFor(Priority.ERROR) will have the value of 'TRUE'.

    Did you get an answer to your question? I have the same problem with WebLogic 10.0.

  • Using log4j with Collab 4.1SP1

    We are trying to Roll collab files every 25MB. When I change the collab appender to org.apache.log4j.RollingFileAPpender, java throws a "java.lang.ClassCastException" exception. We are using Collab 4.1SP1 with Plumtree 5. Here is the audit.xml file that I've tried:
    <?xml version="1.0" encoding="UTF-8"?>
    <plumtree>
    <log enabled="yes">
         <appender class="org.apache.log4j.RollingFileAppender" name="CoreAppender">
    <param name="File" value="$configRootDirectory/logs/collab.log"/>
    <layout class="com.plumtree.openlog.log4jbridge.MyPatternLayout" />
              <param name="MaxFileSize" value="25MB" />
              <param name="MaxBackupIndex" value="10" />
         </appender>
         <appender class="com.plumtree.core.audit.log.ConsoleAppender" name="STDOUT">
              <layout class="com.plumtree.core.audit.log.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
              </layout>          
         </appender>
         <category name="com.plumtree">
         <priority value="debug"/>
         <appender-ref ref="CoreAppender"/>
         </category>
    <!--      
         <root>
         <priority value ="error" />
         <appender-ref ref="STDOUT" />
         </root>
    -->      
    </log>
    <openlog enabled="yes">
    <serverName value="[Server Name]"/>
    <restrictToLocalMachine value="no"/>
    </openlog>
    <profiler enabled="no">
    <http enabled="yes" log="yes" log-headers="no"/>
    <jdbc enabled="no" log="no"/>
    </profiler>
    </plumtree>

    Looks strange to me. RollingFileAppender is a subclass of FileAppender so it has to work because there is no need for casting at all here.
    Does it always work fine for FileAppender?
    If so does somebody can provide example how subclassing can couse this type of error?

  • Can I use Solaris with my Home Recording Studio?

    Hello,
    I am currently building a basic home recording studio. I recently assembled a new computer and will be purchasing music recording equipment very soon. Before I purchase the audio recording gear, I was curious about a few things pertaining to the use of Solaris as my possible choice system.
    The data that I store on my hard drives will need to be secure. I had originally considered RAID 5 though recently found out about RAID Z, which appears to be far ahead of the other RAIDs. I am curious to know more about how to set up a RAID Z system.
    The computer will be running Solaris, various Linux or BSD, and Windows Vista. I have 500GB x4 hard drives. I am considering separating one and using it strictly for Vista, and using the remaining 3 with a RAID set-up for nix. If I had a choice, I would put much less hard drive space into Vista (capping it at 150 to 200 GB), though I have yet to come across a RAID system that effectively or efficiently cooperates cross-platform. With that in mind, the majority of the remaining 1.5TB can go into my studio OS - hopefully Solaris - while left-over hard drive space is set aside for various other *nix.
    I've used Solaris 10 before, though haven't really gone into detail on the mechanics of such features as ZFS, zones, now RAID Z, and the many more amazing features that Solaris provides. Likewise, I am not really familiar with how well the system might operate with software/applications that I could use for recording and composing music.
    Beyond the available 2TB (or 1.5TB RAID-ready) space, my computer is running on a new 64-bit quad-core AMD CPU (~2.6GHz) and currently has 4GB 1066MHz RAM. In my search for preparing a computer that suits me for high performance recording - including the editing and mastering of audio - I am attempting to narrow down my options on the software side of things. I have been very satisfied with the general file management of Solaris, though am unsure of how well it might run as the software side of a home recording studio. An additional factor in deciding will be the software's compatbility with audio PCI cards and external recording/audio interfaces. There is always a question of whether or not the necessary drivers, firmware, or similar is available between any given hardware and software components.
    Some other *nix options I have considered - "Ubuntu Studio 64-bit" (though it appears to prefer 32-bit) and "64 Studio" (also Debian-based, though appears to be optimized for 64-bit). Some colleagues have used Gentoo with studio applications, though I don't know of any Linux distributions that offer the versatility, power, stability, and efficiency of Solaris for the operating system that it is.
    If I use something like "64 Studio", I will have the advantage of a system that is ready-built for studio recording purposes as well as a system that I know is compatible with the sound gear that I am considering purchasing. However, those systems are restricted by their file system types, RAID availability and dependability, and the general disadvantages of using the Linux kernel in general. (I enjoy Linux, though I admittedly prefer Unix over it.)
    Can I use Solaris with my home recording studio?
    Thank you!
    Edited by: the_professor on Nov 9, 2008 6:26 PM
    Corrected a typo.
    Edited by: the_professor on Nov 9, 2008 6:30 PM
    Caught another typo.

    I'm not sure what your question is. If you have particular software you want to run, you should see what you can get that package to run under. Sound hw stuff don't tend to be too portable unless it's written on top of OSS (htttp://www.opensound.com). Were I you, I'd consider separating out the storage part and the processing part. Get something like a cheap dell sc440 to be a file server and give the drives to that (unless you actually can get all the components working under solaris).
    -r

  • Log4J with Weblogic Server 10

    Hi,
    We are migrating an EJB application from Weblogic 8.1 to Weblogic 10.0
    In the current configuration, we simply include the following in the server startup script, so as to specify the log4j configuration file, and this takes care of the logging part.
    -Dlog4j.configuration=file:<complete file name>
    The same thing doesn't work with WL 10. Is there any other (special) way of using Log4j with WL 10?
    Note that inside the code, we use commons-logging to get hold of the logger as follows:-
    org.apache.commons.logging.LogFactory.getLog(class)
    I would be grateful for any help on this.
    Thanks in advance.
    Regards,
    Neelesh

    Tricky questions.. this problem needs more analysing. I see that you are on R27.6.0, we've come with a few updates to that one. Download the latest greatest and see if that works things out: http://www.oracle.com/technology/software/products/jrockit/index.html. If not, then report this issue to JRockit support (see how to below)!
    Best Regards,
    Tuva
    JRockit PM
    How to report to JRockit support:
    You must register and file the issue on Metalink, http://metalink.oracle.com. Note that you must have purchased support to continue.
    If you have problems during the registration or filing you can call our support +1.800.223.1711* or 1-800-633-0738 directly.
    In case you have not purchased support call 1.800.833.3536* for support sales.
    More information on our support site: http://www.oracle.com/support/index.html.
    *) US numbers - for global technical support contacts see: http://www.oracle.com/support/contact.html

  • Using log4j in jdk1.4

    Hi,
    I'm Babu. I am wanting to know about the how to of using log4j in jdk 1.4.
    Babu.

    Do you have a question specifically about how to use log4j in jdk 1.4? There's nothing different when using log4j with jdk 1.4 than with other versions. Put log4j.jar in your classpath. Read the log4j documentation.
    Jesper

  • Using log4j in the weblogic

    Hi,
    I am using log4j in weblogic i am using 1.2.8 version but i am getting some exception
    after another exception can you please tell me what should i do if i have to use
    log4j with weblogic
    thanks
    Arun Purang

    Pedro Salazar <[email protected]> wrote:
    orj.log4j.Logger class.Could be you mistyped your package name here. Use "org.log4j.Logger".
    WebLogic 8.1 SP2 comes with log4j.jar in ${BEA_HOME}/weblogic81/common/lib. Looks
    like it's Log4j 1.2.8.
    I've used Log4j from within an authentication provide with no problems but an
    authentication provider probably runs in the application server context.
    If you want to use log4j in your application, won't you need to add log4j-1.2.8.jar
    (or whatever) to your WEB-INF/lib or modules directory or something?

  • Editing pages created using dreamweaver with microsoft's visual studio express

    Here's a quick, somewhat vague, question for anyone who might have an answer. Is there a trick to editing pages created using dreamweaver with Microsoft Visual Studio Express? The reason I ask is I recently finished a web site for my first client who now wants to make edits herself using the program she uses, that being Microsoft. I thought it would be as easy as pulling the html files from the server (or the usb flash drive i gave her), making changes and then putting them back to the server, but apparently she is having some problems. I'm meeting with her soon. I have no experience with any other programs, other than Adobe, so I don't know how much good I'll be in helping her. Maybe it's an easy question, maybe not. Any info appreciated. Thanks!

    David wrote -
    Dreamweaver template commands are all wrapped in HTML comments, so they
    shouldn't cause any problems. They should simply be treated as comments.
    However, the concept of editable and locked regions will be ignored.
    Hi David, I meant the templates with the dwt extension, not the html files that are created from them. The full version of VS will recognize the dwt extension as 'Dynamic Web Template' but as this is a microsoft extension it does not recognize the code for editing and shows a large number of errors, (before anyone comments the dwt file extension is used by a number of other programs, all referring to a different file type).
    PZ

  • Use Sun Java Studio 2 with Existing Java Application

    I have started using Sun Java Studio 2 and having fun and little difficulty creating a new Java web application from scatch. My question is where do I find information on Java Studio configuration to allow Java Studio to load up and modify Java server pages/forms in an existing Java application that I did not write?
    The Java application has been created with Javabeans and using BEA Weblogic version 7, with a SQL-Server 2000 database backend.
    Below is a bit of code out of one of the main Java forms.
    <%@ page buffer="256kb" autoFlush="false" errorPage="../../common/system/error.jsp"
    import="psdi.jsp.beans.*, psdi.jsp.common.*, psdi.jsp.app.wotrack.*, psdi.jsp.util.* , psdi.mbo.* , psdi.util.* "%>
    I have looked around and have not found what I need to setup in Java Studio to allow me to load up a form and view it in the Visual designer, I keep getting errors on the psdi. references and cannot load up any pages.
    I see on the server install ia folder under the main root <DIR> called <apps>, and inside the <apps> folder is a folder called <jsp> and in the <jsp> folder are sub folders for each main module within the application with all the related .jsp files. I have been manually editing the .jsp files using Windows Notpad and saving the changes. Then I rebuild the .ear file and my changes work fine. Since I have a lot of changes to make there has to be a better way than using Notpad.
    My hope is somewhere is a point-by-point document on what to so I can use Sun Java Studio 2 to make my changes in a visual IDE.
    Any assistance would really be appreciated.

    Hi Giri,
    Yep, this I know,b ut when I do I get errors messages and am looking for some form of point-bypoint instuction that better explains how to setup up custom libraries in Sun Java Studio, custom tags, etc.

  • Libsslport library conflict when using components built with studio 11 & 12

    I have a library built with Studio 11 that links with libstlport.so in studio 11. I then build an application with studio 12 which links with studio 12 stilport.so. When I do an ldd on the application it reports that it depends on stlport.so from both studio 11 and 12. This happens even if I set LD_LIBRARY_PATH to explicitly point to the Studio 12 lib directory.
    On running the application it consistently crashes at exit with the following stack trace:
    std::locale::~locale()
    _exit()
    exit()
    The problem is resolved if we build everything with Studio 11.
    It should be possible to link with components build with older version of the compiler. Can someone tell us what is the right way to do this.
    Thanks.
    Shirish.

    Setting LD_LIBRARY_PATH is useful for testing and for one-off programs used only by yourself, but it is not a sustainable or scalable solution. For more on this topic:
    http://blogs.sun.com/rie/entry/tt_ld_library_path_tt
    When you build applications using shared libraries, you usually need to set the runpath (-R option).
    By default, the CC command sets the runpath to point into the compiler installation area. If parts of the application are build with different compilers, you can by deafult wind up with runpaths pointing into each compiler area, which can lead to linking two versions of a library, a recipe for disaster.
    The best way to solve this problem depends on how you will use and deploy the application. I'll suggest a general solution, which works even if you deploy the application to remote systems used by others.
    Create a runtime environment for the application, perhaps a directory tree like this:
    myapp/
        bin/
        lib/
        doc/Main programs go in the bin directory. Shared libraries go in the lib directory.
    Build shared libraries and executable programs with a relative runpath pointing into the lib directory:
    CC ... -R \$ORIGIN/../libIf you build an application entirely with Studio 11, copy the studio 11 version of libstlport.so into the lib directory.
    If multiple compilers are used, copy libstlport.so from the most recent compiler into the lib directory.

Maybe you are looking for

  • Regarding selection screen output

    hi, i have created ALV report by using selection screen.in this i have displayed kunnr field from kna1 table. but it is showing someextra zero's and then code now i want to display only code not extra zero.here below i am giving example:---- sap code

  • I get no signal when i connect my latop and tv or other output device through my HDMI cable

    no matter what i try i can never get my laptop to display anything through my hdmi. every time i connect it it tell me  "no signal".ive used the duplicate seting and tried different things but still nothing

  • I CAN'T CONNECT MICROPHONE TO MACBOOK AİR

    I'M trying to connect microphone or guitar to my macbook air. Doesn't macbook air have sound card ?

  • Assignment test in SAP for Logistic Invoice varification

    Hello Experts, We want to carry out Assignment Test in SAP for Logistic Invoice varification asp er the scenario: "The assignment text is a process step preceeding the invoice verification in background processing. The software checks cyclically whet

  • Advance RMAN Question

    what is difference b/w backupset and image copy? what is multiplexing? what is parallelism? What are common problems faced with media manager? any common issues with RMAN? How we can update rman repository? if we dont need backups in rman anymore wha