org.apache.velocity.runtime.log.Log4JLogChute initialization failed

View: New views
5 Messages — Rating Filter:   Alert me  

org.apache.velocity.runtime.log.Log4JLogChute initialization failed

by Chachad, Ketan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

 

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?

 

Regards,

Ketan K. Chachad | Atos Origin India | Tower I - France |
ketan.chachad@... <mailto:ketan.chachad@...>  | D:
+91 22 67 33 34 63 | M: +91 98 19 17 02 71

 


Re: org.apache.velocity.runtime.log.Log4JLogChute initialization failed

by Nathan Bubna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There should be a stack trace that went with that message.  What did
it say?  Also, do you have log4j on your classpath?  If so, what
version?

On Thu, Feb 19, 2009 at 4:49 AM, Chachad, Ketan
<Ketan.Chachad@...> wrote:

> Hi,
>
>
>
> 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?
>
>
>
> Regards,
>
> Ketan K. Chachad | Atos Origin India | Tower I - France |
> ketan.chachad@... <mailto:ketan.chachad@...>  | D:
> +91 22 67 33 34 63 | M: +91 98 19 17 02 71
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


RE: org.apache.velocity.runtime.log.Log4JLogChute initialization failed

by Chachad, Ketan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The stack trace is as follows:
org.apache.velocity.exception.VelocityException: Failed to initialize an
instance of org.apache.velocity.runtime.log.Log4JLogChute with the
current runtime configuration.
at
org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.jav
a:206)
at
org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255
)
at
org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstanc
e.java:795)
at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:25
0)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
at
site.app.action.webapp.WebAppStandardAction.executeSupAction(WebAppStand
ardAction.java:123)
at site.app.action.AppAction.executeAction(AppAction.java:78)
at site.app.struts.AbstractAction.execute(AbstractAction.java:108)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
226)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at org.apache.struts.action.HttpServlet.service(HttpServlet.java:760)
at org.apache.struts.action.HttpServlet.service(HttpServlet.java:853)
...

Log4J version used by the web application is 1.2.8.

Please let me know if there are any settings need to be done in the
log4j.properties file or while setting the properties of VelocityEngine
object before calling its init() method.

Regards,
Ketan K. Chachad

-----Original Message-----
From: Nathan Bubna [mailto:nbubna@...]
Sent: Thursday, February 19, 2009 8:47 PM
To: Velocity Users List
Subject: Re: org.apache.velocity.runtime.log.Log4JLogChute
initialization failed

There should be a stack trace that went with that message.  What did
it say?  Also, do you have log4j on your classpath?  If so, what
version?

On Thu, Feb 19, 2009 at 4:49 AM, Chachad, Ketan
<Ketan.Chachad@...> wrote:

> Hi,
>
>
>
> 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?
>
>
>
> Regards,
>
> Ketan K. Chachad | Atos Origin India | Tower I - France |
> ketan.chachad@... <mailto:ketan.chachad@...>  |
D:
> +91 22 67 33 34 63 | M: +91 98 19 17 02 71
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: org.apache.velocity.runtime.log.Log4JLogChute initialization failed

by Nathan Bubna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's just the wrapping exception; it doesn't tell much of anything.
I need the cause exception that was caught and wrapped by that
VelocityException.

On Thu, Feb 19, 2009 at 8:58 PM, Chachad, Ketan
<Ketan.Chachad@...> wrote:

> The stack trace is as follows:
> org.apache.velocity.exception.VelocityException: Failed to initialize an
> instance of org.apache.velocity.runtime.log.Log4JLogChute with the
> current runtime configuration.
> at
> org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.jav
> a:206)
> at
> org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255
> )
> at
> org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstanc
> e.java:795)
> at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:25
> 0)
> at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
> at
> site.app.action.webapp.WebAppStandardAction.executeSupAction(WebAppStand
> ardAction.java:123)
> at site.app.action.AppAction.executeAction(AppAction.java:78)
> at site.app.struts.AbstractAction.execute(AbstractAction.java:108)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
> ocessor.java:421)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
> 226)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
> at org.apache.struts.action.HttpServlet.service(HttpServlet.java:760)
> at org.apache.struts.action.HttpServlet.service(HttpServlet.java:853)
> ...
>
> Log4J version used by the web application is 1.2.8.
>
> Please let me know if there are any settings need to be done in the
> log4j.properties file or while setting the properties of VelocityEngine
> object before calling its init() method.
>
> Regards,
> Ketan K. Chachad
>
> -----Original Message-----
> From: Nathan Bubna [mailto:nbubna@...]
> Sent: Thursday, February 19, 2009 8:47 PM
> To: Velocity Users List
> Subject: Re: org.apache.velocity.runtime.log.Log4JLogChute
> initialization failed
>
> There should be a stack trace that went with that message.  What did
> it say?  Also, do you have log4j on your classpath?  If so, what
> version?
>
> On Thu, Feb 19, 2009 at 4:49 AM, Chachad, Ketan
> <Ketan.Chachad@...> wrote:
>> Hi,
>>
>>
>>
>> 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?
>>
>>
>>
>> Regards,
>>
>> Ketan K. Chachad | Atos Origin India | Tower I - France |
>> ketan.chachad@... <mailto:ketan.chachad@...>  |
> D:
>> +91 22 67 33 34 63 | M: +91 98 19 17 02 71
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...


Re: org.apache.velocity.runtime.log.Log4JLogChute initialization failed

by Brad Whitaker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?