Serializing org.apache.log4j.Level

Hi,
I'm working with Log4j and I have to serialize an org.apache.log4j.Level that has not an empty constructor but only more static instaces.
Is there a workaround to do this ?
Or How can I use the static instance ?
Thanks,
Bye Luigia

this is my XML file
<java version="1.5.0_08" class="java.beans.XMLDecoder">
<object class="org.apache.log4j.net.SyslogAppender">
<void property="name">
<string>my.syslog</string>
</void>
<void property="SyslogHost">
<string>localhost</string>
</void>
<void property="Facility">
<string>local0</string>
</void>
How can I specify the "Threshold" Property of the SyslogAppender at "INFO" or int value?
The threshold is a org.apache.log4j.Level.

Similar Messages

  • Import org.apache.log4j.Level;

    Cannot Resolve Symbol
    symbol : class Level
    location: package log4j
    import org.apache.log4j.Level;
    Can anyone suggest something.
    Thanks Tiboy.

    Hi there,
    I have another doubt. Im trying to deploy a web application/J2EE. I use JBOSS. Now, after compiling and placing my jar files in the required directory and as i start the JBOSS server I get the following error in the console............
    10:11:06,551 WARN [jbossweb] java.lang.IllegalStateException: Servlet class
    com
    .ncit.user.server.servlet.MainPageRequestHandler is not a
    javax.servlet.Servlet
    java.lang.IllegalStateException: Servlet class
    com.ncit.user.server.servlet.Main
    PageRequestHandler is not a javax.servlet.Servlet
    at
    org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:203)
    I just can't seem to figure out whats the problem.
    My RequestHandler extends an Abstract Req.Handler which imports javax.* etc etc.
    Please suggest a solution.
    Thanks,
    Tiboy.

  • Java.lang.ClassNotFoundException: org.apache.log4j.Logger

    I got below error tried to load the first JSP in JDeveloper 11g. The log4j library is defined in the project. There is not compilation error. Please help!
    ava.lang.NoClassDefFoundError: org/apache/log4j/Logger
         at jsp_servlet.__index._jspService(__index.java:98)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         Truncated. see log file for complete stacktrace

    Did you read this part there:
    There is a second possible issue that is specific to the commons-logging and related libraries when used with Integrated WLS and the configuration (which includes ADF) out-of-the-box. Because the commons-logging.jar is apparently in the system classpath, due to the way Java classloader delegation works, any log4j classes at the web application level are not visible to the logger factory by default. As long as this is the case, you may need to add the following to your web-application's WEB-INF/weblogic.xml:
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    What this does is tell the WLS JSP servlet to let web application classes override classes found in the system classloader. Standard Java classloader delegation gives the highest priority to the system classes.

  • Need help with log4j logging tool (org.apache.log4j.*) to log into database

    Hi,
    I need help with log4j logging tool (org.apache.log4j.*) to log into database using JDBCAppender. Have look at my logger code and corresponding log4j.properties file stated below. I'm running this program using Eclipse IDE and it's giving me the following error (highlighted in red) at the end:
    log4j: Parsing for [root] with value=[debug, stdout, Roll, CRSDBAPPENDER].
    log4j: Level token is [debug].
    log4j: Category root set to DEBUG
    log4j: Parsing appender named "stdout".
    log4j: Parsing layout options for "stdout".
    log4j: Setting property [conversionPattern] to [%x %d{HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n].
    log4j: End of parsing for "stdout".
    log4j: Parsed "stdout" options.
    log4j: Parsing appender named "Roll".
    log4j: Parsing layout options for "Roll".
    log4j: Setting property [conversionPattern] to [%x %d{yyyy.MM.dd HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n].
    log4j: End of parsing for "Roll".
    log4j: Setting property [file] to [HelloWorld.log].
    log4j: Setting property [maxBackupIndex] to [10].
    log4j: Setting property [maxFileSize] to [20KB].
    log4j: setFile called: HelloWorld.log, true
    log4j: setFile ended
    log4j: Parsed "Roll" options.
    log4j: Parsing appender named "CRSDBAPPENDER".
    {color:#ff0000}
    Can't find class HelloWorld{color}
    import org.apache.log4j.*;
    public class HelloWorld {
    static Logger log = Logger.getLogger(HelloWorld.class.getName());
    public static void main(String[] args) {
    try{
    // Now, try a few logging methods
    MDC.put("myComputerName", "Ravinder");
    MDC.put("crsServerName", "ARNDEV01");
    log.debug("Start of main()");
    log.info("Just testing a log message with priority set to INFO");
    log.warn("Just testing a log message with priority set to WARN");
    log.error("Just testing a log message with priority set to ERROR");
    log.fatal("Just testing a log message with priority set to FATAL");
    catch(Exception e){
    e.printStackTrace();
    ------------------------- log4j.properties file ------------------------------
    #### Use three appenders - log to console, file and database
    log4j.rootCategory=debug, stdout, Roll, CRSDBAPPENDER
    log4j.debug=true
    # Print only messages of priority WARN or higher for your category
    # log4j.category.your.category.name=WARN
    # Specifically inherit the priority level
    # log4j.category.your.category.name=INHERITED
    #### stdout - First appender writes to console
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%x %d{HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n
    #### Roll - Second appender writes to a file
    log4j.appender.Roll=org.apache.log4j.RollingFileAppender
    ##log4j.appender.Roll.File=${InstanceName}.log
    log4j.appender.Roll.File=HelloWorld.log
    log4j.appender.Roll.MaxFileSize=20KB
    log4j.appender.Roll.MaxBackupIndex=10
    log4j.appender.Roll.layout=org.apache.log4j.PatternLayout
    log4j.appender.Roll.layout.ConversionPattern=%x %d{yyyy.MM.dd HH:mm:ss,SSS} %5p [%t] (%c:%-4L %M) - %m%n
    #### CRSDBAPPENDER - third appender writes to the database
    log4j.appender.CRSDBAPPENDER=org.apache.log4j.jdbc.JDBCAppender
    log4j.appender.CRSDBAPPENDER.Driver=net.sourceforge.jtds.jdbc.Driver
    log4j.appender.CRSDBAPPENDER.URL=jdbc:jtds:sqlserver:/arncorp15:1433;DatabaseName=LOG
    log4j.appender.CRSDBAPPENDER.USER=sa
    log4j.appender.CRSDBAPPENDER.PASSWORD=p8ss3doff
    log4j.appender.CRSDBAPPENDER.layout=org.apache.log4j.PatternLayout
    log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG (computername, crsservername, logtime, loglevel, threadname, filename, linenumber, logtext) VALUES ('%X{myComputerName}', '%X{crsServerName}', '%d{dd MMM yyyy HH:mm:ss,SSS}', '%p', '%t', '%F', '%L', '%m')
    #log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG(COMPUTERNAME,CRSSERVERNAME,LOGTIME,LOGLEVEL,THREADNAME,FILENAME,LINENUMBER,LOGTEXT) select host_name(),'${CRSServerName}${InstanceName}','%d','%5p','%t','%F','%L','%m%n'
    #log4j.appender.CRSDBAPPENDER.sql=INSERT INTO LOG (computername, crsservername, logtime, loglevel, threadname, filename, linenumber, logtext) VALUES ("%X{myComputerName}", "%X{crsServerName}", "%d{dd MMM yyyy HH:mm:ss,SSS}", "%p", "%t", "%F", "%L", "%m")
    ------------------------------- end of log4j.properties file ------------------------------
    Here is the directory structure of my program. My log4j.properties file and HelloWorld.class file are residing in folder HelloWorld\bin.
    HelloWorld\bin
    HelloWorld\lib
    HelloWorld\src
    Please note - The same program works fine for console and file appender when I comment the database appender part in my properties file.
    Thanks
    Ravinder

    try this :
    log4j.appender.PROJECT.Append=false

  • Org/apache/log4j/Category on OAS 10.1.3 and Jdev 10.1.3.5

    Hi,
    I am new to ADF and my company is also new to ADF. We are doing how it coudl help us in acclerating the development of custom screens on top of OTM 5.5
    I am using OAS 10.1.3. I am getting org/apache/log4j/Category error at the time of deployment causing road block. Plz help...
    Below are the steps I followed
    1. Stopped OAS
    2. Install ADF Installer 10.1.3.5 by extracting files, changing adfinstaller.properties, and running java -jar runinstaller.jar adfinstaller.properties
    3. Started OAS
    4. OAS never started up as server.xml had an new entry
         <application name="datatags" path="../../../BC4J/redist/datatags.ear" start="true" />
         <import-shared-library name="oracle.ws.jaxrpc"/>
    5. datatags directory was malformed in the sense META-INF/application.xml and other .xml file was not created at all.
    6. Since ADF requires only libraries to be available, I removed this 2 enteries and started up the OAS.
    7. Started the OAS
    8. Copied files from
    [$Jdeveloper Home]\jakarta-taglibs
    to
    [$OC4J Home]\BC4J\lib
    the files are:
    commons-digester.jar
    commons-logging.jar
    commons-collections.jar
    9. Download and copy apache-log4j-1.2.15 (log4j-1.2.15.jar) to [$OC4J Home]\BC4J\lib
    10. I created a simpel ADF Helloworld page.
    11.Created a deployment discriptor orion-application and added the following enteries
    <imported-shared-libraries>
    <remove-inherited name="apache.commons.logging"></remove-inherited>
    </imported-shared-libraries>
    12. I right clicked on my UserInterface ->New-> Deployment profile -> Created a WAR file
    13. Right click the WAR file and deployed to the OAS
    14. I got the following deployment error
    Wrote EAR file to C:\shobz\SOFTWARES\otm_jdev_10G\jdev\mywork\TestADF\UserInterface\deploy\webapp1.ear
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Uploading file webapp1.ear ...
    Application Deployer for webapp1 STARTS.
    Copy the archive to /u01/app/otm/otmapp/oas/j2ee/home/applications/webapp1.ear
    Initialize /u01/app/otm/otmapp/oas/j2ee/home/applications/webapp1.ear begins...
    Unpacking webapp1.ear
    Done unpacking webapp1.ear
    Unpacking webapp1.war
    Done unpacking webapp1.war
    Initialize /u01/app/otm/otmapp/oas/j2ee/home/applications/webapp1.ear ends...
    Starting application : webapp1
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Initializing EJB sessions
    Committing ClassLoader(s)
    Initialize webapp1 begins...
    Initialize webapp1 ends...
    Started application : webapp1
    Binding web application(s) to site default-web-site begins...
    Binding webapp1 web-module for application webapp1 to site default-web-site under context root TestADF-UserInterface-context-root
    Operation failed with error:
    org/apache/log4j/Category
    Deployment failed
    I tried step 9 and 11 in order to get rid of this log4j error.
    Your help is highly appreciated.
    Shobz
    Edited by: user13114596 on Jan 6, 2011 8:40 PM

    ADF 11g requires JEE 5.0 server.
    Oracle Application Server 10.1.3 supports J2EE 1.4.
    JDeveloper 11g application won't run on OAS 10.1.3.

  • Import classes like org.apache.log4j.*

    Dear All,
    I am studying some programs which use XML parsers in Java to read and write data in XML format.
    I am unable to compile the main program as I am unable to import library
    org.apache.log4j.Category and org.apache.log4j.PropertyConfigurator
    I have downloaded the entire XML pack from your site and unzipped each jar. Many classes have been identified except the ones above.
    Please tell me how to get around solving this problem.
    Thanks
    Ranjan

    Those classes are part of jakarta log4J, not the Java XML pack.
    You will need to visit http://jakarta.apache.org/log4j/docs/index.html and install log4j to compile/run that program. Or have you already installed it and successfully imported org.apache.log4j.*?
    Hope that helps.

  • Java.lang.NoClassDefFoundError: org/apache/log4j/Logger when creating ABCS

    Hi,
    I am trying to create a AIA Service Component Project using 11.1.1.5 jdev.
    The following error occured while executing this line: C:\XXX\Developement\AIA\build.xml:78: Could not create type evaluateFTL due to java.lang.NoClassDefFoundError:org/apache/log4j/Logger.
    do I have to put some jar files anywhere in jdeveloper ? Please advice.
    Thanks
    Sai

    Hi,
    The jar to be added is com.bea.core.apache.log4j_1.2.13.jar located in $MIDDLEWARE_HOME/modules
    Cheers,
    Vlad

  • How to configue plugins for java like org.apache.log4j.Logger

    My application tries to import org.apache.log4j.Logger ,import org.apache.commons.lang.StringUtils
    and many such packages of org.
    I got downloaded Logger package but could not figue it out how to configure it so that application can find it out through org.apache.log4j.Logger etc directory structure , because the installation instructions they gave there seems to create different directory structure.
    Also is there any place where I can get the all packages of org group and cnfiguration tips for them.
    Thanks & Regards,
    Multicoder

    My application tries to import org.apache.log4j.Logger ,import org.apache.commons.lang.StringUtils
    and many such packages of org.
    I got downloaded Logger package but could not figue it out how to configure it so that application can find it out through org.apache.log4j.Logger etc directory structure , because the installation instructions they gave there seems to create different directory structure.
    Also is there any place where I can get the all packages of org group and cnfiguration tips for them.
    Thanks & Regards,
    Multicoder

  • Comms6 IM java.lang.NoClassDefFoundError: org/apache/log4j/Layout

    Hi,
    After install (and configure) Comms6 Instant Messaging Server I cannot turn on IM services:
    bash-3.00# svcadm enable sunim
    bash-3.00# svcs -xv
    svc:/application/sunim:default (Sun Instant Messaging Server)
    State: offline since Thu Sep 18 18:57:15 2008
    Reason: Start method is running.
    See: http://sun.com/msg/SMF-8000-C4
    See: /var/svc/log/application-sunim:default.log
    Impact: This service is not running.
    (I added some debug lines to the /opt/sun/comms/im/sbin/imadmin)
    bash-3.00# tail /var/svc/log/application-sunim:default.log
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    [TIMEOUT]
    [ Sep 18 18:41:57 Method "start" exited with status 1 ]
    [ Sep 18 18:44:57 Leaving maintenance because disable requested. ]
    [ Sep 18 18:44:57 Disabled. ]
    [ Sep 18 18:57:15 Enabled. ]
    [ Sep 18 18:57:15 Executing start method ("/opt/sun/comms/im/sbin/imadmin start") ]
    Starting Watchdog /opt/sun/comms/im/sbin/../lib/execdaemon /usr/jdk/entsys-j2se/bin/java -Dlogdir=/var/opt/SUNWiim/default/log -Djava.awt.headless=true -cp /opt/sun/comms/im/sbin/../lib/imcommon.jar:/opt/SUNWmfwk/lib/mfwk_instrum_tk.jar:/opt/SUNWmfwk/lib/mfwk_agent.jar:/opt/SUNWmfwk/lib/rmi2rpc.jar:/opt/SUNWmfwk/lib/xml-apis.jar:/opt/SUNWmfwk/lib/javax77.jar:/opt/SUNWmfwk/lib/jdom.jar:/opt/SUNWmfwk/lib/xercesImpl.jar:/opt/SUNWjdmk/5.1/lib/jmx.jar:/opt/SUNWjdmk/5.1/lib/jmxremote.jar:/opt/SUNWjdmk/5.1/lib/jmxremote_optional.jar:/opt/SUNWjdmk/5.1/lib/jdmkrt.jar:/usr/share/lib/xmpp/improvider.jar:/usr/share/lib/imservice.jar:/opt/sun/comms/im/sbin/../lib/xmppd.jar:/usr/share/lib/jso.jar:/usr/share/lib/xp.jar:/usr/share/lib/log4j.jar:/usr/share/lib/jaxen-core.jar:/usr/share/lib/saxpath.jar com.iplanet.im.server.Watchdog -m noncluster -c /opt/sun/comms/im/sbin/../config/iim.conf
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    Anyway,
    When I try to start it manually I get the same error:
    bash-3.00# /opt/sun/comms/im/lib/execdaemon /usr/jdk/entsys-j2se/bin/java -Dlogdir=/var/opt/SUNWiim/default/log -Djava.awt.headless=true -cp /opt/sun/comms/im/sbin/../lib/imcommon.jar:/opt/SUNWmfwk/lib/mfwk_instrum_tk.jar:/opt/SUNWmfwk/lib/mfwk_agent.jar:/opt/SUNWmfwk/lib/rmi2rpc.jar:/opt/SUNWmfwk/lib/xml-apis.jar:/opt/SUNWmfwk/lib/javax77.jar:/opt/SUNWmfwk/lib/jdom.jar:/opt/SUNWmfwk/lib/xercesImpl.jar:/opt/SUNWjdmk/5.1/lib/jmx.jar:/opt/SUNWjdmk/5.1/lib/jmxremote.jar:/opt/SUNWjdmk/5.1/lib/jmxremote_optional.jar:/opt/SUNWjdmk/5.1/lib/jdmkrt.jar:/usr/share/lib/xmpp/improvider.jar:/usr/share/lib/imservice.jar:/opt/sun/comms/im/sbin/../lib/xmppd.jar:/usr/share/lib/jso.jar:/usr/share/lib/xp.jar:/usr/share/lib/log4j.jar:/usr/share/lib/jaxen-core.jar:/usr/share/lib/saxpath.jar com.iplanet.im.server.Watchdog -m noncluster -c /opt/sun/comms/im/sbin/../config/iim.conf
    bash-3.00# Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Layout
    at com.iplanet.im.server.Watchdog.main(Watchdog.java:224)
    It comes from non global zone on Solaris 10u5.

    The package SUNWiimdv was not installed.
    bash-3.00# pwd
    /install/SunOS_i386/IMAPI/Packages
    bash-3.00# pkgadd -d . SUNWiimdv
    Processing package instance <SUNWiimdv> from </export/install/comms/SunOS_i386/IMAPI/Packages>
    Sun Java System Instant Messaging and Presence APIs(i386) 7.3,REV=2008.01.14
    Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved.
    PROPRIETARY/CONFIDENTIAL
    Use is subject to license terms.
    Using </> as the package base directory.
    ## Processing package information.
    ## Processing system information.
    3 package pathnames are already properly installed.
    ## Verifying package dependencies.
    ## Verifying disk space requirements.
    ## Checking for conflicts with packages already installed.
    ## Checking for setuid/setgid programs.
    Installing Sun Java System Instant Messaging and Presence APIs as <SUNWiimdv>
    ## Installing part 1 of 1.
    /usr/share/lib/imservice.jar
    /usr/share/lib/jaxen-core.jar
    /usr/share/lib/jso.jar
    /usr/share/lib/log4j.jar
    /usr/share/lib/saxpath.jar
    /usr/share/lib/xmpp/improvider.jar
    /usr/share/lib/xmpp/xmppd
    /usr/share/lib/xmpp/xmppd.conf
    /usr/share/lib/xp.jar
    [ verifying class <none> ]
    Installation of <SUNWiimdv> was successful.
    bash-3.00# /opt/sun/comms/im/sbin/imadmin stop
    Stopping IM services using SMF. Please see the SMF logs for progress messages
    bash-3.00# /opt/sun/comms/im/sbin/imadmin start
    Starting IM services using SMF. Please see the SMF logs for progress messages
    bash-3.00# /opt/sun/comms/im/sbin/imadmin status
    Server [UP]
    Multiplexor [UP]
    Agent:calendar [UP]
    Watchdog [UP]

  • Import problem org.apache.log4j.PropertyConfigurator

    Sorry if this is a dumb question but:-
    I have entered
    import org.apache.log4j.PropertyConfigurator;
    into NB5.5 and it says "package org.apache.log4j does not exist".
    Am I supposed to download this package or is it on my PCs hard disk somewhere? I've done a file search but failed to find it. Does it come with JDE or JDK? or have I not set up a CLASSPATH variable/parameter?
    Please can someone help?
    Drew

    First check whether you have log4j libraries on your machine.
    By Default its not available with JRE or JDK.
    If you dont find locally, download it from the apache site.

  • Any ideas what causes Blocked trying to get lock: org.apache.log4j.spi ...

    Hi, We are using WebLogic 9.2.2 with Java 1.5. The application is written using Struts 1.3 and log4j 1.2.15. We found a numbeer of errors that looked like below in our managed server's .out file. Any ideas what might be a cause or how to troubleshoot further? Our sys admin sadly did not preserve a thread dump:
    <Jun 30, 2009 3:00:11 PM UTC> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "604" seconds working on the request "Http Request: /myapp/hhFlow.do", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-135888 "[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, blocked, priority=1, DAEMON> {
    -- Blocked trying to get lock: org.apache.log4j.spi.RootLogger@151f325[fat lock]
    org.apache.log4j.Category.callAppenders(Category.java:188)
    org.apache.log4j.Category.forcedLog(Category.java:379)
    org.apache.log4j.Category.log(Category.java:840)
    org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:109)
    org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:303)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:272)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1903)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:736)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:851)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198)
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.myco.regui.servlets.filters.TransactionFilter.doFilter(TransactionFilter.java:23)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308)
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:117)
    weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1938)
    weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1860)
    weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1327)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:206)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks for any feedback, - Dave

    Hi, We are using WebLogic 9.2.2 with Java 1.5. The application is written using Struts 1.3 and log4j 1.2.15. We found a numbeer of errors that looked like below in our managed server's .out file. Any ideas what might be a cause or how to troubleshoot further? Our sys admin sadly did not preserve a thread dump:
    <Jun 30, 2009 3:00:11 PM UTC> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "604" seconds working on the request "Http Request: /myapp/hhFlow.do", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-135888 "[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, blocked, priority=1, DAEMON> {
    -- Blocked trying to get lock: org.apache.log4j.spi.RootLogger@151f325[fat lock]
    org.apache.log4j.Category.callAppenders(Category.java:188)
    org.apache.log4j.Category.forcedLog(Category.java:379)
    org.apache.log4j.Category.log(Category.java:840)
    org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:109)
    org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:303)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:272)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1903)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:736)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:851)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198)
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.myco.regui.servlets.filters.TransactionFilter.doFilter(TransactionFilter.java:23)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308)
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:117)
    weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1938)
    weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1860)
    weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1327)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:206)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks for any feedback, - Dave

  • Org/apache/log4j/Category

    Hi,
    When I try to run a client problem by using
    log4j. It gives me the folllowing error:
    java.lang.NoClassDefFoundError: org/apache/log4j/Category
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    I am wondering if the above class is still included in log4j-1.2.8.jar
    thanks,
    Rick

    The long answer is, look for yourself. You can look into a jar file with any zip utility program (e.g. Winzip if you are working on Windows). However it happens that I have that jar file on my system and the short answer is, yes.

  • Log4j level inheritance concept doubt

    log.properties file
    log4j.debug=true
    log4j.rootLogger=ERROR, A1
    log4j.appender.A1=org.apache.log4j.ConsoleAppender
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    log4j.appender.A1.layout.ConversionPattern=%m%n
    log4j.logger.logging.basics=WARN, cs3
    log4j.appender.cs3=org.apache.log4j.RollingFileAppender
    log4j.appender.cs3.layout=org.apache.log4j.PatternLayout
    log4j.appender.cs3.File=c:\\logas.txt
    log4j.appender.cs3.layout.ConversionPattern=%m%n
    log4j.appender.cs3.MaxFileSize=100KB
    log4j.appender.cs3.MaxBackupIndex=1
    log4j.additivity.com.durasoft.logging=false
    log4j.logger.RAM=INHERITED, B1
    log4j.appender.B1=org.apache.log4j.RollingFileAppender
    log4j.appender.B1.layout=org.apache.log4j.PatternLayout
    log4j.appender.B1.File=c:\\trylog.txt
    log4j.appender.B1.layout.ConversionPattern=%m%n
    log4j.appender.B1.MaxFileSize=100KB
    log4j.appender.B1.MaxBackupIndex=1
    package logging.basics;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.util.Properties;
    import org.apache.log4j.BasicConfigurator;
    import org.apache.log4j.FileAppender;
    import org.apache.log4j.Logger;
    import org.apache.log4j.PatternLayout;
    import org.apache.log4j.PropertyConfigurator;
    import org.apache.log4j.spi.RootLogger;
    public class LogBasics
         public static void main(String[] args) throws IOException
              Properties prop = new Properties();
              FileInputStream stream = new  FileInputStream("logging\\Resources\\log.properties");
              prop.load(stream);
              PropertyConfigurator.configure(prop);
              Logger temp = Logger.getLogger("RAM");
              RootLogger root = (RootLogger)                     Logger.getRootLogger();
              temp.error("h1i"); 
              temp.warn("hel1lo");
    }Refering to above code and properties file(in bold font), the logger named "RAM" didnt inherit from logging.basics package(which it lies), but inherits only from root, even though level and appenders for logging.basics package is specified in properties file.
    I doubt, because according to level inheritance concept, the logger must inherit from parent level(assuming parent is not null).
    Here parent ,is logging.basics for LogBasics class,so RAM logger must inherit from logging.basics as logging.basics is defined in properties file.
    But,its not happening?Why it is so?
    2) also please explain me what getLogger does when configured using property file
    Thank you.

    phanikrishnait wrote:
    Hai
    I have 3 class class A,B,C in multi level as below the method present in class A should only be accessed in A and B .Should not be visible in C and notaccessible for C class object.Java does not support that in general. In this specific case, if A and B are in the same package, and C is in a different package, and the method in question has package-private access level (not public, private, or protected).
    However, if you're doing this, you almost certainly have a design flaw. My guess is you're trying to use inheritance for code sharing, which is not what it's for.

  • Apache log4j

    I need to use logger in my application.
    Can anyone give me some ideas how to start.Small introduction will be good and sufficient.
    Is apache log4j good or the java.logger?

    The core of Apache log4j is the log4j.properties file which you can download from different sites.
    This file defines the various way of logging the messages.
    After placing this file in the folder where you have the java classes,you need to have the log4j.jar file which provides the API related to this logger.
    Then on any java file u can log the message using the logger object.
    Ex: Logger log=Logger.getRootLogger();
    log.warn("this is warining message");
    log.info("this is info message");
    Depending on the appender specified on the log4j.properties the log may be displayed on the console or may be printed on the specified file.
    Here is the part of log4j.properties file:
    ### direct log messages to stdout ###
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.Target=System.out
    log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
    #log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    #log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
    log4j.rootLogger=info, stdout
    I think this will help you a lot!

  • JSF/Tiles: [java.lang.ClassNotFoundException: org.apache.tiles.servlets.Til

    Hi,
    I am working on JSF1.2 in SAP NetWeaver CE and I am using Tiles. Please help me to resolve the following issues.
    ~~~~~~~~~~~~~~~~~~~
    1. File:G:\ws_wd\ce_ws.jdi\LocalDevelopment\DCs\demo.sap.com\lbsjsf\ear\_comp\gen\default\deploy\demo.sap.com~lbsjsf~ear.ear
         Name:lbsjsf~ear
         Vendor:demo.sap.com
         Location:localDevelopment
         Version:20090402105707
         Deploy status:Warning
         Version:NEW
         Description:
              1. Warning occurred on server 4585250 during deploy demo.sap.com/lbsjsf~ear : Web Class Existence Test: servlet class "org.apache.tiles.servlets.TilesServlet" cannot be found in the application class path. Possible reasons: 1) package or class name not correct; 2) missing referenced component (application or library); 3) missing reference to component (application or library)., file: demo.sap.com~lbsjsf~web.war#WEB-INF/web.xml, column 0, line 0, severity: warning
    Warning occurred on server 4585250 during deploy demo.sap.com/lbsjsf~ear : Web Class Existence Test: The servlet "com.cg.lbs.ui.controller.StartupConfigurationServlet" must implement "javax.servlet.Servlet"., file: demo.sap.com~lbsjsf~web.war#WEB-INF/web.xml, column 0, line 0, severity: warning
              2. Warning exception has been returned while the 'demo.sap.com/lbsjsf~ear' was starting. Warnings:
    Warning occurred on server 4585250 during startApp demo.sap.com/lbsjsf~ear : Cannot load servlet [org.apache.tiles.servlets.TilesServlet]. Error is: [java.lang.ClassNotFoundException: org.apache.tiles.servlets.TilesServlet
    ------------------------- Loader Info -------------------------
    ClassLoader name: [demo.sap.com/lbsjsf~ear]
    Living status: alive
    Direct parent loaders:
    [system:Frame]
    [service:servlet_jsp]
    [service:ejb]
    Resources:
    F:\usr\sap\CE1\J00\j2ee\cluster\apps\demo.sap.com\lbsjsf~ear\servlet_jsp\lbsjsf\root\WEB-INF\classes
    ++++++++++++++below is my web.xml+++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
         <display-name>
              LocalDevelopment~LocalDevelopment~lbsjsf(2fweb~demo.sap.com
         </display-name>
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>maxFileSize</param-name>
                   <param-value>20m</param-value>
              </init-param>
         </filter>
         <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
              <servlet-name>Faces Servlet</servlet-name>
         </filter-mapping>
         <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
         </filter-mapping>
         <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>Tiles Servlet</servlet-name>
              <servlet-class>
                   org.apache.tiles.servlets.TilesServlet
              </servlet-class>
              <init-param>
                   <param-name>definitions-config</param-name>
                   <param-value>/WEB-INF/tiles.xml</param-value>
              </init-param>
              <load-on-startup>3</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>StartupConfiguration</servlet-name>
              <servlet-class>
                   com.cg.lbs.ui.controller.StartupConfigurationServlet
              </servlet-class>
              <init-param>
                   <param-name>log4j-init-file</param-name>
                   <param-value>sswblog4j.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.faces</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
         </welcome-file-list>
    </web-app>

    That's a pretty decent error message. Have you eliminated the potential causes which were listed in the message?

Maybe you are looking for

  • Tour Smartphone 9630 not synching. Getting "unknown error message"

    After 6 months of no problems, I am now unable to sync my Blackberry to my computer. I am getting an "unknown error message" what's going on?

  • RAW CR2 NOT LOADING IN REVIEW LION 10.7.3 MAC PRO

    After upgrading to Lion 10.7.3, Adobe, Canon RAW CR2 files are not previewable. I don't use iPhoto and if I did, apaerantly I'd have to buy that upgrade (NOT INCLUDED IN LION?) from ver. 7 to ver.11? I'm pretty much done with spending money pointless

  • Outside audio

    Is it possible to use a mini jack headphone extension and go from the itouch headphone out to audio input on your stereo ? thanx

  • MacBook Internal Speakers - Which side seems to be louder?

    For me, the right side internal speaker (where arrow keys are) seems to be louder than the left side speaker (where caps lock key is). Does anyone know where exactly those internal speakers are? I put my ear on each side and I felt that the left spea

  • Can't read screen it's to big

    I was playing a game. I forgot wich one. Then my screen went to big to see anything. I clicked on the home button, but nothing changed. Then I tried to set it out. It got nicely. But when I put in on the only thing I could see was a little bit of the