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.
Similar Messages
-
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,
RickThe 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.
-
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
RanjanThose 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. -
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, - DaveHi, 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,
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
Ravindertry this :
log4j.appender.PROJECT.Append=false -
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
SaiHi,
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,
MulticoderMy 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?
DrewFirst 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. -
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 stacktraceDid 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. -
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 Luigiathis 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. -
Error executing transaction: org/apache/xpath/XPathAPI
I have imported one transaction from 12.0.5 MII verstion to 12.1 version and got the following error while running. I think this error is related to some java class. Could you please tell me where to pu the jar for solving this error.
In case this error comes due to some other problem please let me know
Transaction Complete.
Error executing transaction: org/apache/xpath/XPathAPIHi,
Now I understood the problem and it is related to the dependency jar files. For running my custom actions I have the
dependency of 2 jar files . One is sqljdbc.jar and second is xalan.jar. sqljdbc.jar I have added in the following way. Can anyone tell me how can I add the xalan.jar in catalog.xml file
<?xml version="1.0" encoding="UTF-8"?>
<ComponentCatalog >
<Category Name="My Functions" Description="My Custom Objects">
<Component Type="Action" Name="XAController12" Description="" Label="XA Controller" ClassName="com.my.xacute.actions.XAController12" AssemblyName="my.jar" Dependencies="sqljdbc.jar"/>
</Category>
</ComponentCatalog>
Thanks
Shaji -
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! -
Eclipse won't resolve org.apache.* packages
Hello everyone,
I'm relatively new to java and eclipse and I am really stuck trying to use various packages.
First a little history on what I am doing. I've created a project from existing source using the new java project wizard. This source code is obtained from the Book: XML and Java: Developing Web Applications, 2nd Edition. It's sort of dated. It uses SDK 1.3, and xerces 1.4.3 the current is 2.9.1. I have version 2.9.0 according to the Eclipse plugin registry. ( Thought I'd mention this in the event it may be relevant ).
The problem is Eclipse will not resolve this line of code:
import org.apache.xerces.parsers.DOMParser;
I look at plugins and I see xerces listed:
Provider:: eclipse.org
Plug-in Name:: Apache Xerces-J
Version:: 2.9.0v200909240008
Plug-in ID:: org.appache.xerces
However, Eclipse content assist does not list any org.apache packages and of course it won't compile without fatal errors.
In an attempt to correct the problem I've created a classpath variable in
Preferences > Java > Buildpath > Classpath variables:: xerces_2_9_0 - /Applicatins/Eclipse/plugins/org.apache.xerces_2.9.0.v200909240008.jar
Then added the var to a launch configuration.
The same error still persists::
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
DOMParser cannot be resolved to a type
DOMParser cannot be resolved to a type
at chap02.SimpleParse.main(SimpleParse.java:20)
I've also tried to add jar's to the libraries using Preferences > Java > Build Path > User Libraries but the the button on the right 'Add jars...' is not acitve.
The complete source code is listed below. Although I don't think the problem resides there.
Anyone who can help me in understanding this problem and resolving it would be greatly appreciated.
( I obviously am misunderstanding something ).
Regards,
gjames
package chap02;
* SimpleParse.java
import org.w3c.dom.Document;
import org.apache.xerces.parsers.DOMParser;
import org.xml.sax.SAXException;
import java.io.IOException;
public class SimpleParse {
public static void main(String[] argv) {
if (argv.length != 1) {
System.err.println(
"Usage: java chap02.SimpleParse <filename>");
System.exit(1);
try {
// Creates a parser object
DOMParser parser = new DOMParser();
// Parses an XML Document
parser.parse(argv[0]);
// Gets a Document object
Document doc = parser.getDocument();
// Does something
} catch (SAXException se) {
System.out.println("Parser error found: "
+se.getMessage());
System.exit(1);
} catch (IOException ioe) {
System.out.println("IO error found: "
+ ioe.getMessage());
System.exit(1);
}gmjames wrote:
..I'm relatively new to java and eclipse and I am really stuck trying to use various packages. 1) The Jars need to be added to the compile-time & run-time class-path of the application.
2) You will be better off figuring how to do that in Ant or from the command line, rather than an IDE.
3) When posting code, code snippets, HTML/XML or input/output, please use the code tags. The code tags protect the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button.
4) For best help on Eclipse, see the [Eclipse forums|http://www.eclipse.org/forums/].
Maybe you are looking for
-
Hi all, I would like to know how I can trigger an custom interface program when i receive a certain idoc. Do I have to schedule my interface program at periodic intervals or is there any other way? Thanks,
-
Hi, We are following the below link for Auto-Approval for self registration http://identityandaccessmanager.blogspot.com/2011/03/suppress-approval-self-registration.html here what it says: 1. Export "SelfCreateUserDataset.xml". 2. Remove Approver-Onl
-
How can I return my account
-
I can download and open an .epub from Adobe into my ADE v. 3 with no problems. But when I try to link to a vendor site where I bought a book I get the downloaded .acsm file but that can't then be used to connect to the vendor to obtain the book. It
-
How to start IM on 7210 supernova, get free settin...
please send me IM setting for 7210 supenova, how to start it, what is packet data?