You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Shinobu Kawai <sh...@gmail.com> on 2004/09/21 17:18:29 UTC
NullPointerException with templates in jar files
Hi Phillip,
(Changed the subject)
> I keep getting a null pointer Exception loading template error message.
> My templates are in a jar file as a package starting from the root dir
> of the jar.
>
> the properties file is successfully read :
It may be /read/ successfully, but it isn't /initializing/ Velocity
successfully. It looks like it's failing to get the entries of the jar
file. Could the jar file be corrupt? Anyways, look at the Velocity
logs for a bit more detail.
> But it keeps producing a null pointer exception on
> Velocity.getTemplate("mypackage.templates.templateTest.vm")
> [
> at
> org.apache.velocity.runtime.resource.loader.JarHolder.getEntries(JarHold
> er.java:154)
Is this the full stack trace? The "at" tells me there's a little more
to it. And BTW, which version of Velocity are you using? The line
numbers don't match the ones for 1.4.
Best regards,
-- Shinobu Kawai
--
Shinobu Kawai(shinobu.kawai@gmail.com)
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org