You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Paulo Eduardo Azevedo Silveira <pe...@linux.ime.usp.br> on 2002/08/06 17:03:03 UTC

odd problem with FileResourceLoader

Hello Guys

I have a webapp, using a single VelocityServlet.
(velocity 1.2, using dep.jar, jdk 1.4)

Here at home, it runs fine in tomcat 4.0.4 standalone.

When I send it to my server (redhat), it inits fine, but the
ResourceManager does not find any of the templates.

I ve configured the  "file.resource.loader.path" from the properties file
and from the loadProperties overwritten method.

In another Servlet, I print Velocity.getProperty("file.resource.loader.path") and it has the
value that I need(a vector of paths). I thought it could be a permission
problem, but if I do as the following:

File f = new File("/the/template/dir", "template.vm");
FileInputStream fis = new FileInputStream(f.getAbsolutePath());

and prints it, it works perfectly... Note that this is the EXACT way that
FileResourceLoader looks for the file in each path.

The exception is being thrown in ResourceManager  line 428 (velocity 1.2),
which is after 
trying to look for the file in all paths, and you have a null inputStream.

ANY ideas? I am really getting crazy, it has been two days now...

Thanks a lot

paulo

---------
"The software required Win95 or better, so I installed Linux."
"Standards are good! Let us have a LOT of them!"
Paulo Eduardo A. Silveira   <pe...@linux.ime.usp.br>
UIN: 5142673   www.paulo.com.br


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>