You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/05/09 00:07:05 UTC
DO NOT REPLY [Bug 8922] New: -
default log system not present in distrib, need a simple class that sends all output to System.out in the event that Avalon or whatever can't be loaded.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8922>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8922
default log system not present in distrib, need a simple class that sends all output to System.out in the event that Avalon or whatever can't be loaded.
Summary: default log system not present in distrib, need a simple
class that sends all output to System.out in the event
that Avalon or whatever can't be loaded.
Product: Velocity
Version: 1.3-rc1
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Build
AssignedTo: velocity-dev@jakarta.apache.org
ReportedBy: mpg@mpgsoftware.com
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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>