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.

Similar Messages

  • 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.

  • 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.

  • 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.

  • 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

  • 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

    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.

  • 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

  • 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]

  • 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.

  • 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

  • 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.

  • Cannot import package org.apache.catalina in Tomcat 4.1

    Hi,
    Don't know why I cannot import org.apache.catalina.realm.RealmBase.*; or org.apache.catalina.*; but no problem in importing org.apache.*; ?
    error prompts "package org.apache.catalina.realm.RealmBase does not exist " Thanks.
    Jackie

    Yes, I can find org.apache.catalina.jar in /lib but why my jsp program cannot locate this class? Something wrong with my web.xml / server.xml? Thank you.

  • Help to solve problem with packaging log4j in a EAR file

    Hi All
    i struggle hard to create a EAR composed of EJB JARs and WARs and the programs
    in these JARs and WARs use log4j to log msg. Because i want all J2EE apps to have
    their own version of log4j library, i package log4j.jar in the EAR file. Below
    is my EAR package structure
    EJB1.jar
    EJB2.jar
    SharedUtilities.jar
    log4j.jar
    log4j.properties
    WEBAPP1.war
    WEBAPP2.war
    META-INF/manifest.mf
    For both EJB1.jar and EJB2.jar's META-INF/manifest.mf, there is a below entries
    Manifest-Version: 1.0
    Class-Path: SharedUtilities.jar log4j.jar
    However, my program always hit below runtime error.
    [java] Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception:
    : java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
    But the program in EJB1.jar and EJB2.jar seem to have no such problem in loading
    classes in SharedUtilities.jar. The problem can be eliminated if i put log4j.jar
    at system classpath. Can anybody provide me with info on how to package a log4j
    library within a EAR package ?
    In addition, where should i put the log4j.properties so that it will be at search
    path of log4j and automatically loaded by log4j lib
    regards
    Danny

    Hi Slava Imeshev
    I am a bit confused about your reply. As said, the log4j.jar was packaged in my
    ear file. If the log4j.jar was not packaged in ear file, how come the ejb classloader
    can locate it.
    Secondly, if log4j.jar is included in system classpath, the ejb also can load
    log4j classes by system classloader. No "NoClassDeffound" exception is thrown.
    regards
    dso
    "Slava Imeshev" <[email protected]> wrote:
    "dso" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava Imeshev
    thanks for your response. I am a bit confused about your answer.
    i can't understand why u said the classloader COULD loadorg/apache/log4j/PropertyConfigurator.
    According to the error msg, it said
    " java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator".
    Seemingly,
    this class in log4j.jar could not be located. But as i said in lastquestion,
    i seemed to have properly
    edit the "META-INF/manifest.mf" in EJB1.jar and EJB2.jar to includelog4j.jar
    in "Class-path" attribute. And my EJB classes have no problem in loadingclasses
    in SharedUtilities.jar. Would u please elaborate on it in more details?
    Sure. NoClassDefFoundError means that a DEPENDING class
    can not be loaded. If the classloader were not able to load the class
    itself, it would give you ClassNotFoundException.
    Just make sure that you don't have the same packages in
    the ear and in the class path so that you don't have classes
    loaded by system classloader trying to load classes loaded
    by ejb classloaders.
    regards
    dso
    "Slava Imeshev" <[email protected]> wrote:
    First, this error means that classloader was able to load
    org/apache/log4j/PropertyConfigurator, but cold not load
    one of depending classes. I'd inspect the CLASSPATH
    to see if there are any log4 classes there.
    Second, you can package your log4.properties into
    log4.jar itself.
    Regards,
    Slava Imeshev
    "dso" <[email protected]> wrote in message
    news:[email protected]...
    Hi All
    i struggle hard to create a EAR composed of EJB JARs and WARs and
    the
    programs
    in these JARs and WARs use log4j to log msg. Because i want all
    J2EE
    apps
    to have
    their own version of log4j library, i package log4j.jar in the EARfile.
    Below
    is my EAR package structure
    EJB1.jar
    EJB2.jar
    SharedUtilities.jar
    log4j.jar
    log4j.properties
    WEBAPP1.war
    WEBAPP2.war
    META-INF/manifest.mf
    For both EJB1.jar and EJB2.jar's META-INF/manifest.mf, there is
    a below
    entries
    Manifest-Version: 1.0
    Class-Path: SharedUtilities.jar log4j.jar
    However, my program always hit below runtime error.
    [java] Caused by: javax.ejb.TransactionRolledbackLocalException:EJB
    Exception:
    : java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
    But the program in EJB1.jar and EJB2.jar seem to have no such problemin
    loading
    classes in SharedUtilities.jar. The problem can be eliminated if
    i
    put
    log4j.jar
    at system classpath. Can anybody provide me with info on how to
    package
    a
    log4j
    library within a EAR package ?
    In addition, where should i put the log4j.properties so that it
    will
    be at
    search
    path of log4j and automatically loaded by log4j lib
    regards
    Danny

  • The import org.apache cannot be resolved

    Hi All,
    I am a Java\Eclipse newbie. I am trying to import the org.apache.xerces package, and the import is failing with this error:The import org.apache cannot be resolved
    I am not using Maven\Ant for building the project. I know I need to download some class files\jar files to get this to work, but I am not sure where to download these packages from. Could someone please help me out here?
    import org.w3c.dom.Node;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.dom.traversal.TreeWalkerImpl;
    import org.apache.xerces.domx.traversal.NodeFilter;
    import org.apache.xerces.dom.DocumentImpl;
    THanks a lot!

    Well, if you are in fact looking to download the JARs for the Apache Xerces project, you should be able to find them at the Apache Xerces project page.
    If you already have the JARs downloaded, you need to make sure that they appear on your CLASSPATH, otherwise your application will never find them. Since you are using an IDE, this should be as easy as adding the JARs to your project.

Maybe you are looking for