velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilkka Priha <impr...@surfeu.fi>
Subject Re: ClasspathResourceLoader
Date Fri, 11 Jun 2004 14:17:11 GMT
Hi

I've had problems with some class loaders with relative pathnames. Try

/com/foo/bar/macros.vm

-- Ilkka


Darren Davison wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Is there a known issue with loading a macro library from inside a jar file 
> (I've seen one or two similar posts in list archives about it)?
> 
> I'm trying to do just that, but the resource is never found:
> 
> 2004-06-11 13:44:15,087 ERROR [org.apache.velocity.app.VelocityEngine] - 
> <ResourceManager : unable to find resource 'com/foo/bar/macros.vm' in any 
> resource loader.>
> 
> However, if I move it out of a jar and into WEB-INF/classes/com/foo/bar then 
> it is found and loaded:
> 
> 2004-06-11 13:48:10,181 INFO [org.apache.velocity.app.VelocityEngine] - 
> <ResourceManager : found com/foo/bar/macros.vm with loader 
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader>
> 
> The jar file is in WEB-INF/lib
> 
> Cheers,
> - -- 
> Darren Davison
> Public Key: http://www.davison.uk.net/pages/key.htm
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
> iD8DBQFAyaxhKLMLAN01aw0RAs79AJ0XZ802cPY5PJaIDs2zYfbS6aB15ACfTStj
> iM2dR3poWBqD2U8znOMEVVQ=
> =aWKJ
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> .
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message