users@glassfish.java.net

Re: migrating from v2.1 to v3 issues

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Tue, 05 Jan 2010 13:52:26 -0800

On 12/30/09 02:07 PM, glassfish_at_javadesktop.org wrote:
> I tried my existing application to deploy on a glassfish v3, but have problems.
>
> Issue is in implementation of ServletContextListener I implemented, it uses getResourceAsStream, which works in v2.1, but not in v3, I just get NullPointerException 's
>

Can you post the complete stack trace?

Thanks,

Jan
> Example:
> getServletContext().getResourceAsStream("WEB-INF/file.properties");
>
> I tried getResource(), which works until I get .getFile() which is normally empty string or even null, but if File exists, it throws NullPointException.
>
> I'm on Windows 7.
> [Message sent by forum member 'snovak7' (snovak7_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=378085
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>