Like an idiot, I had my template misspelled.  Apologies for wasting people's 
time.

Chris

--- On Sat, 3/19/11, Chris Castle <[email protected]> wrote:

> From: Chris Castle <[email protected]>
> Subject: Problem with ClasspathResourceLoader
> To: [email protected]
> Date: Saturday, March 19, 2011, 11:34 AM
> Hi all, I’ve got what I’m sure is
> a simple problem with the ClasspathResourceLoader.  I
> have defined the following properties and put my template in
> the root of my single jar.  I’m getting a
> ResourceNotFoundException from it.
> 
>         Properties vProps = new
> Properties();
>        
> vProps.put(Velocity.RESOURCE_LOADER, "classpath");
>         vProps.put("classpath." +
> Velocity.RESOURCE_LOADER + ".class" ,
> ClasspathResourceLoader.class.getName());
>         Velocity.init(vProps);
>         try {
>             Template template
> = Velocity.getTemplate("template.vm");
>         } catch (Exception e) {
>             // TODO
> Auto-generated catch block
>            
> e.printStackTrace();
> }
> 
> On a side note, is there an archive search somewhere that I
> have missed?  I'm sure this problem has been answered
> plenty of times.
> Thanks for the help ,
> 
> Chris
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to