Details
Description
First of all, a problem with this site:
I just submitted this bug by laboriously typing in lots of detailed info, and
your bug servlet complained that it was missing a component, and to
press "back", but I then lost everything I had typed.
This is really "insult to injury". Please don't let the user go to a new page
and throw away everything that they've typed! This is a favor to you guys and
the development community.
Phew! Now, the main point:
This is the second time I've posted a bug in the log system, this time
regarding the default settings in the velocity.properties file searching for an
Avalon log system that is not present.
Here's what you do: If the avalon log system is not found, create a simple
class that sends everything to Standard.out.
O.k.?
The class to change is: org.apache.velocity.runtime.log.LogManager.java
The line to change is in the following block of code, noted inline:
try
{ als = new AvalonLogSystem(); als.init( rsvc ); }catch( NoClassDefFoundError ncdfe )
{ ///////////////////////////// PUT THE CHANGE HERE! ////////////////////////////// END OF THE CHANGE, REMOVE THE REST OF THE CODE ///////////////////////////// IN THIS CATCH BLOCK String errstr = "PANIC : Velocity cannot find any of the" + " specified or default logging systems in the classpath," + " or the classpath doesn't contain the necessary classes" + " to support them." + " Please consult the documentation regarding logging." + " Exception : " + ncdfe; System.out.println( errstr ); System.err.println( errstr ); throw ncdfe; }java.lang.NoClassDefFoundError: org/apache/log/format/Formatter
at org.apache.velocity.runtime.log.LogManager.createLogSystem
(LogManager.java:200)
at org.apache.velocity.runtime.RuntimeInstance.initializeLogger
(RuntimeInstance.java:533)
at org.apache.velocity.runtime.RuntimeInstance.init
(RuntimeInstance.java:267)
at org.apache.velocity.runtime.RuntimeSingleton.init
(RuntimeSingleton.java:169)
at org.apache.velocity.app.Velocity.init(Velocity.java:123)
at com.wonderwidgets.util.Preprocessor.main(Preprocessor.java:20)
Thanks.
Matt Gould