----------- Environment:
Eclipse Version: 3.3.2
apache-log4j-1.2.15
----------- Log4J.properties file (in the webcontext/src directory)
# Set root category priority to DEBUG and set its only appender to A1
log4j.rootCategory=DEBUG, A1
# A1 is set to be a ConsoleAppender (writes to system console).
log4j.appender.A1=org.apac
he.log4j.C
onsoleAppe
nder
# A1 uses PatternLayout.
log4j.appender.A1.layout=o
rg.apache.
log4j.Patt
ernLayout
log4j.appender.A1.layout.C
onversionP
attern=%-4
r [%t] %-5p %c %x - %m%n
------------------ log4j-1.2.15.jar in WEB-INF/lib direcotry
----------------------- ERROR MEssages:
When I start J2EE preview server, I am getting the below errors
Starting preview server
Port 8080
Modules:
Test
org.mortbay.util.MultiExce
ption[org.
apache.com
mons.loggi
ng.LogConf
igurationE
xception: org.apache.commons.logging
.LogConfig
urationExc
eption: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging
.impl.Log4
JLogger (Caused by java.lang.NoClassDefFoundE
rror: org/apache/log4j/Category)
(Caused by org.apache.commons.logging
.LogConfig
urationExc
eption: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging
.impl.Log4
JLogger (Caused by java.lang.NoClassDefFoundE
rror: org/apache/log4j/Category)
)]
at org.mortbay.http.HttpServe
r.doStart(
HttpServer
.java:686)
at org.mortbay.util.Container
.start(Con
tainer.jav
a:72)
at org.eclipse.wst.server.pre
view.inter
nal.Previe
wStarter.r
un(Preview
Starter.ja
va:116)
at org.eclipse.wst.server.pre
view.inter
nal.Previe
wStarter.m
ain(Previe
wStarter.j
ava:39)
org.apache.commons.logging
.LogConfig
urationExc
eption: org.apache.commons.logging
.LogConfig
urationExc
eption: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging
.impl.Log4
JLogger (Caused by java.lang.NoClassDefFoundE
rror: org/apache/log4j/Category)
(Caused by org.apache.commons.logging
.LogConfig
urationExc
eption: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging
.impl.Log4
JLogger (Caused by java.lang.NoClassDefFoundE
rror: org/apache/log4j/Category)
)
at org.apache.commons.logging
.impl.LogF
actoryImpl
.newInstan
ce(LogFact
oryImpl.ja
va:543)
at org.apache.commons.logging
.impl.LogF
actoryImpl
.getInstan
ce(LogFact
oryImpl.ja
va:235)
at org.apache.commons.logging
.impl.LogF
actoryImpl
.getInstan
ce(LogFact
oryImpl.ja
va:209)
I apprecaite your help.
Thanks
Start Free Trial