You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by henry human <he...@yahoo.de> on 2011/02/02 10:40:31 UTC

Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Hi I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:
private static final Logger LOGGER = Logger.getLogger(Hello.class);
It works when i run the application in eclipse.
but not as a JAR application!(he application is not running on tomcat an is only a smal commandline application)

Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger

Thanks for your advice



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by Pid <pi...@pidster.com>.
On 02/02/2011 09:40, henry human wrote:
> Hi I get the following error when I try to call a smal java application(hello friends!) which i placed in a jar file. the application has the log4j.jar in its lib directory (and classpath) and calls the log4j.logger like this:
> private static final Logger LOGGER = Logger.getLogger(Hello.class);
> It works when i run the application in eclipse.
> but not as a JAR application!(he application is not running on tomcat an is only a smal commandline application)
> 
> Error:
> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> 
> Thanks for your advice

Please do not hijack threads.

When sending an email to the list, start an entirely new email.

Editing the subject & body of a reply to an existing email thread does
not edit or remove the message headers which tie that email to a
conversation.


p

Re: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 2/2/2011 8:44 AM, Caldarale, Charles R wrote:
>> From: henry human [mailto:henry_human@yahoo.de] 
>> Subject: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger
> 
>> I get the following error when I try to call a smal java 
>> application(hello friends!) which i placed in a jar file.
>> the application has the log4j.jar in its lib directory 
>> (and classpath) and calls the log4j.logger like this:
>> private static final Logger LOGGER = Logger.getLogger(Hello.class);
>> It works when i run the application in eclipse.
>> but not as a JAR application!(he application is not running 
>> on tomcat an is only a smal commandline application)
> 
>> Error:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/log4j/Logger
> 
> Two questions:
> 
> 1) What's the name of this mailing list?
> 
> 2) Was there anything in your description related to Tomcat?

+1

Also

3) Don't hijack threads.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1J6RgACgkQ9CaO5/Lv0PDxHQCgoeyMQ5jB2n1ypPIdl4FYwEYL
W04AniAn85VTSiBymtyFRRjKH3ruBpma
=VK5D
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: henry human [mailto:henry_human@yahoo.de] 
> Subject: Get the following error: NoClassDefFoundError: org/apache/log4j/Logger

> I get the following error when I try to call a smal java 
> application(hello friends!) which i placed in a jar file.
> the application has the log4j.jar in its lib directory 
> (and classpath) and calls the log4j.logger like this:
> private static final Logger LOGGER = Logger.getLogger(Hello.class);
> It works when i run the application in eclipse.
> but not as a JAR application!(he application is not running 
> on tomcat an is only a smal commandline application)

> Error:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log4j/Logger

Two questions:

1) What's the name of this mailing list?

2) Was there anything in your description related to Tomcat?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.