[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: Re: org.apache.velocity.runtime.log.Log4JLogChute initialization
From: Brad Whitaker <dbwbca () yahoo ! com>
Date: 2009-05-19 21:13:56
Message-ID: 23624247.post () talk ! nabble ! com
[Download RAW message or body]
I encountered the same error in my web app. I fixed it by following the
instructions in the Velocity Developer's Guide in the section on "Using
Log4j With Existing Logger":
http://velocity.apache.org/engine/devel/developer-guide.html#usinglog4jwithexistinglogger
As soon as I set properties for RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS
and "runtime.log.logsystem.log4j.logger" the problem went away.
Chachad, Ketan wrote:
>
>
> I have used Velocity in my web application.
>
> I am not using any "velocity.properties" file as loading the file was
> becoming a problem.
>
> So to initialize VelocityEngine the code used is as follows:
>
> VelocityEngine ve = new VelocityEngine();
>
> ve.setProperty("resource.loader", "webapp");
>
> ve.setProperty("webapp.resource.loader.class","org.apache.velocity.tools
> .view.servlet.WebappLoader");
>
> ve.setProperty("webapp.resource.loader.path","/WEB-INF/templates/");
>
> ve.setApplicationAttribute("javax.servlet.ServletContext",this.servlet.g
> etServletContext());
>
> ve.init();
>
>
>
> While the web application works fine on my local host, but when it was
> deployed on to the test application server, it gave the following error
>
> Error Code 500
>
> Message Failed to initialize an instance of
> org.apache.velocity.runtime.log.Log4JLogChute with the current runtime
> configuration.
>
>
>
> Can anyone tell me what needs to be done to avoid this error?
>
>
--
View this message in context: \
http://www.nabble.com/org.apache.velocity.runtime.log.Log4JLogChute-initialization-failed-tp22099662p23624247.html
Sent from the Velocity - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic