velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B. Scott Smith" <>
Subject Re: NullPointerException in init() during redeploy
Date Thu, 01 Jul 2010 19:40:37 GMT
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 

log.error("getResourceAsStream() returned null: 

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 

Second, if I copy all of the default properties into my own 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 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<>:
>> 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:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message