I am using Jetty 6.1.24 (latest stable release). I tried a much older
version (Jetty 4.2.x) and the problem also occurs.
I am running JREv1.6, but it also fails on JREv1.4.2.
I will try to setup an environment to deploy it in Tomcat and see, but
it may take a while.
In doing more tests, I have discovered some additional things.
First, I added a line in
org.apache.velocity.runtime.RuntimeInstance#setDefaultProperties():
log.error("getResourceAsStream() returned null:
"+getClass().getResource('/'+DEFAULT_RUNTIME_PROPERTIES));
and this shows a valid URL, so it is able to find the resource, but
won't provide an inputStream to it. It prints:
getResourceAsStream() returned null:
jar:file:<path to my
app>/WEB-INF/lib/velocity-dep.jar!/org/apache/velocity/runtime/defaults/velocity.properties
Second, if I copy all of the default properties into my own
velocity.properties file, and return with no error from
setDefaultProperties(), it then blows up in initializeDirectives() with
the same problem (inputStream is null). If I modify it to hardcode the 8
properties from the directives.properties file and return, then my
application runs fine. So, the ONLY issue is trying to load these
properties files from the velocity-dep.jar, no other issues occur.
Somehow, my ClassLoader is getting messed up, and I can't figure out how
to "reset" it.
- Scott
On 7/1/2010 2:07 PM, Antonio Petrelli wrote:
2010/7/1 B. Scott Smith<[email protected]>:
The input stream it is returning is NULL. This only seems to happen when I
re-deploy into my Servlet Container (I am using Jetty). If I then shut down
the entire JVM and restart, the application runs fine.
What version of Jetty are you using? If you deploy it in, say, Tomcat,
does it work?
Antonio
---------------------------------------------------------------------
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]