You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/10/02 06:17:48 UTC

[jira] Resolved: (VELOCITY-75) Send all log output to System.out in the event that Avalon or whatever can't be loaded.

     [ http://issues.apache.org/jira/browse/VELOCITY-75?page=all ]
     
Will Glass-Husain resolved VELOCITY-75:
---------------------------------------

    Resolution: Fixed

Velocity-403 has been applied.  (includes fix to this issue).

> Send all log output to System.out in the event that Avalon or whatever can't be loaded.
> ---------------------------------------------------------------------------------------
>
>          Key: VELOCITY-75
>          URL: http://issues.apache.org/jira/browse/VELOCITY-75
>      Project: Velocity
>         Type: Bug
>   Components: Source
>     Versions: 1.3-rc1
>  Environment: Operating System: All
> Platform: All
>     Reporter: Matt Gould
>     Priority: Minor
>      Fix For: 1.5

>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org