Advertisement

04.23.2008 at 10:55AM PDT, ID: 23347638
[x]
Attachment Details

Setting Log4J:  ClassNotFoundException issues

Asked by jtreddy in Eclipse, J2EE, Java Servlets

Tags: Eclipse, Log4J, EE, java.lang.ClassNotFoundException: org.apache.log4j.Category

----------- 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.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%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.MultiException[org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))]
      at org.mortbay.http.HttpServer.doStart(HttpServer.java:686)
      at org.mortbay.util.Container.start(Container.java:72)
      at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:116)
      at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:39)
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@4aeb52 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
      at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
      at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
      at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)


I apprecaite your help.
Thanks

Start Free Trial
[+][-]04.24.2008 at 02:54AM PDT, ID: 21429078

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 05:46AM PDT, ID: 21430177

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 05:56AM PDT, ID: 21430255

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 05:58AM PDT, ID: 21430269

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 11:35AM PDT, ID: 21433797

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 12:33PM PDT, ID: 21434338

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 03:16PM PDT, ID: 21435675

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 02:32AM PDT, ID: 21437966

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Eclipse, J2EE, Java Servlets
Tags: Eclipse, Log4J, EE, java.lang.ClassNotFoundException: org.apache.log4j.Category
Sign Up Now!
Solution Provided By: girionis
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.07.2008 at 02:11AM PDT, ID: 21514437

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.04.2008 at 10:02AM PDT, ID: 21934003

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.28.2008 at 07:36AM PDT, ID: 22335354

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.01.2008 at 06:45AM PDT, ID: 22360163

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628