You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jjgtx <je...@yahoo.com> on 2011/10/05 17:57:31 UTC

logging.properties and no classdef error when trying to switch to log4j 6.0.18

I am trying to configure log4j logging, but when I remove the
conf/logging.properties file I get the following error in catalina.out and
nothing more. 

Could not find the main class: .  Program will exit.
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
        at java.net.URLClassLoader$1.run(Unknown Source)

Googling around I found that the logging.properties files missing causes the
problem (multiple posts) but if I dont remove I still see the commons
loggings file output even though I have replace the juli jar files  in both
CATALINA_HOME and CATALINA_BASE with the versions downloaded from
bin/extras. Any ideas on what I should check next. I'm guessing it is stil
trying to use commons logging instead of log4j, but not sure why,. 
-- 
View this message in context: http://old.nabble.com/logging.properties-and-no-classdef-error-when-trying-to-switch-to-log4j-6.0.18-tp32595470p32595470.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: logging.properties and no classdef error when trying to switch to log4j 6.0.18

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/10/5 jjgtx <je...@yahoo.com>:
>
> I am trying to configure log4j logging, but when I remove the
> conf/logging.properties file I get the following error in catalina.out and
> nothing more.
>
> Could not find the main class: .  Program will exit.
> java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
>        at java.net.URLClassLoader$1.run(Unknown Source)
>

1. 6.0.18 is old. Why don't you upgrade to a more recent version.

Also, have you read the docs?

2. Just removing the logging.properties file should not have caused this error.

It is likely that you broke something else as well.

There were many fixes to startup scripts since 6.0.18 as well.

3. You can reconfigure the file to log everything to Console, but the
file itself is needed.

You can reconfigure Tomcat logging to use log4j, but you cannot turn
off  java.util.logging API of Java entirely.

Bootstrap classes use it.
Some web applications can use it as well.

Best regards,
Konstantin Kolinko

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