You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by piero de salvia <pi...@yahoo.com> on 2001/07/26 13:10:16 UTC

Velocity error mesage

hi fellas,

would anybody have a clue about where this is coming
from, and what it means?

java.lang.NullPointerException at
org.apache.velocity.runtime.log.AvalonLogSystem.logVelocityMessage(AvalonLogSystem.java:172)
at
org.apache.velocity.runtime.RuntimeInstance.log(RuntimeInstance.java:858)
at
org.apache.velocity.runtime.RuntimeInstance.error(RuntimeInstance.java:897)
at
org.apache.velocity.runtime.resource.ResourceManager.getResource(ResourceManager.java:461)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:734)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:716)
at
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:550)



piero de salvia

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Velocity error mesage

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
piero de salvia wrote:
> 
> Hi Geir,
> 
> I don´t have the code right now, I´m on vacation and I
> was not even supposed to look at a computer...

My wife tries that on me.  She solves it by making me leave laptops at
home, and going places where 'internet cafe' don't exist...

> 
> But just before leaving, I took a look at my ISP´s
> directory structure, and it seems that the Avalon
> logger cannot open a log file for writing, (the file I
> specified in velocity´s config), for lack of
> permission, but it fails silently then, and when
> trying to serve a request (so I suppose when trying to
> log the "template found..." message and so on), the
> whole thing crashes and burns. So maybe an exception
> should be thrown at either moment, instead of having
> to deal with a mysterious Null Pointer.

Yep.  Tossing a panic exception on logger failure is prollie the right
way to go. I am going to try to switch to the log4j ME as the embedded
file logger, after I get the instance changes in, so we can do it
then...

Enjoy the vacation.

geir
 
> bye bye
> 
> piero de salvia
> 
> --- "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> > piero de salvia wrote:
> > >
> > > yessir,
> > >
> > > I am calling init, and in fact, this is also part
> > of
> > > the error message:
> > >
> > > Runtime properties:
> > > file.resource.loader.path =>
> > > /home/sites/web/WEB-INF/template
> > > runtime.log =>
> > > /home/sites/web/WEB-INF/logs/manager/velocity.log
> > > velocimacro.library => [/macros/head.vm,
> > > /macros/altbgcolor.vm]
> > >
> >
> > Huh?
> >
> > > problem is, it works on my machine and it doesn't
> > work
> > > on my ISP.
> >
> > Double 'huh?'  The only things that would be
> > different are classpath and
> > JVM...
> >
> > Can you send me your code?
> >
> > geir
> >
> >
> > --
> > Geir Magnusson Jr.
> > geirm@optonline.net
> > System and Software Consulting
> > Developing for the web?  See
> > http://jakarta.apache.org/velocity/
> > Be well, do good work, and keep in touch.
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb

Re: Velocity error mesage

Posted by piero de salvia <pi...@yahoo.com>.
Hi Geir,

I don�t have the code right now, I�m on vacation and I
was not even supposed to look at a computer...

But just before leaving, I took a look at my ISP�s
directory structure, and it seems that the Avalon
logger cannot open a log file for writing, (the file I
specified in velocity�s config), for lack of
permission, but it fails silently then, and when
trying to serve a request (so I suppose when trying to
log the "template found..." message and so on), the
whole thing crashes and burns. So maybe an exception
should be thrown at either moment, instead of having
to deal with a mysterious Null Pointer.

bye bye 

piero de salvia


--- "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> piero de salvia wrote:
> > 
> > yessir,
> > 
> > I am calling init, and in fact, this is also part
> of
> > the error message:
> > 
> > Runtime properties:
> > file.resource.loader.path =>
> > /home/sites/web/WEB-INF/template
> > runtime.log =>
> > /home/sites/web/WEB-INF/logs/manager/velocity.log
> > velocimacro.library => [/macros/head.vm,
> > /macros/altbgcolor.vm]
> > 
> 
> Huh?
> 
> > problem is, it works on my machine and it doesn't
> work
> > on my ISP.
> 
> Double 'huh?'  The only things that would be
> different are classpath and
> JVM...
>  
> Can you send me your code?
> 
> geir
> 
> 
> -- 
> Geir Magnusson Jr.                          
> geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See
> http://jakarta.apache.org/velocity/
> Be well, do good work, and keep in touch.


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Velocity error mesage

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
piero de salvia wrote:
> 
> yessir,
> 
> I am calling init, and in fact, this is also part of
> the error message:
> 
> Runtime properties:
> file.resource.loader.path =>
> /home/sites/web/WEB-INF/template
> runtime.log =>
> /home/sites/web/WEB-INF/logs/manager/velocity.log
> velocimacro.library => [/macros/head.vm,
> /macros/altbgcolor.vm]
> 

Huh?

> problem is, it works on my machine and it doesn't work
> on my ISP.

Double 'huh?'  The only things that would be different are classpath and
JVM...
 
Can you send me your code?

geir


-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Be well, do good work, and keep in touch.

Re: Velocity error mesage

Posted by piero de salvia <pi...@yahoo.com>.
yessir,

I am calling init, and in fact, this is also part of
the error message:

Runtime properties:
file.resource.loader.path =>
/home/sites/web/WEB-INF/template
runtime.log =>
/home/sites/web/WEB-INF/logs/manager/velocity.log
velocimacro.library => [/macros/head.vm,
/macros/altbgcolor.vm]

problem is, it works on my machine and it doesn't work
on my ISP.

piero
--- "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> piero de salvia wrote:
> > 
> > hi fellas,
> > 
> > would anybody have a clue about where this is
> coming
> > from, and what it means?
> > 
> > java.lang.NullPointerException at
> >
>
org.apache.velocity.runtime.log.AvalonLogSystem.logVelocityMessage(AvalonLogSystem.java:172)
> > at
> >
>
org.apache.velocity.runtime.RuntimeInstance.log(RuntimeInstance.java:858)
> > at
> >
>
org.apache.velocity.runtime.RuntimeInstance.error(RuntimeInstance.java:897)
> > at
> >
>
org.apache.velocity.runtime.resource.ResourceManager.getResource(ResourceManager.java:461)
> > at
> >
>
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:734)
> > at
> >
>
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:716)
> > at
> >
>
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:550)
> 
> It's a NullPointerException :)
> 
> I can tell from the trace that you are using my new
> version that
> provides separate runtime instances.
> 
> Did you call init?
> 
> 
> -- 
> Geir Magnusson Jr.                          
> geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See
> http://jakarta.apache.org/velocity/
> Be well, do good work, and keep in touch.


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: Velocity error mesage

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
piero de salvia wrote:
> 
> hi fellas,
> 
> would anybody have a clue about where this is coming
> from, and what it means?
> 
> java.lang.NullPointerException at
> org.apache.velocity.runtime.log.AvalonLogSystem.logVelocityMessage(AvalonLogSystem.java:172)
> at
> org.apache.velocity.runtime.RuntimeInstance.log(RuntimeInstance.java:858)
> at
> org.apache.velocity.runtime.RuntimeInstance.error(RuntimeInstance.java:897)
> at
> org.apache.velocity.runtime.resource.ResourceManager.getResource(ResourceManager.java:461)
> at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:734)
> at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:716)
> at
> org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:550)

It's a NullPointerException :)

I can tell from the trace that you are using my new version that
provides separate runtime instances.

Did you call init?


-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Be well, do good work, and keep in touch.