i am getting this error (NPE in FilterInputStream.close()) when a bot or crawler tries to access an invalid asset path.
when i have a png like this: http://www.myhhost.de/assets/59f0e7531f25d4c0/some/subfolder/gfx/logo.png crawlers often try to crawl the "folders" of this path: http://www.myhhost.de/assets/59f0e7531f25d4c0/some/subfolder/gfx/ or http://www.myhhost.de/assets/59f0e7531f25d4c0/some/subfolder/ this leads to this NPE as mentioned. i added a apache2 mod_rewrite rule to not get bothered by this: RewriteEngine on RewriteRule ^/assets/\w{16}/.*/$ - [F] i could detect this easily, because i installed an "requestedUrl" MDC variable in my log4j environment. so i see in every error-logging-event what the url was, that caused the error. see my reply in "Joining tapestry exception handling" thread, how to accomplish that. very handy when crawlers and bots cause many error level logging events. felix Am 10.05.2012 09:22, schrieb Lance Java: > I've just taken a look at the 5.2.6 code for ResourceStreamerImpl and it > looks like the input stream is being closed twice via is.close() and > InternalUtils.close(is). This looks like a bug to me > > try > { > is = streamble.getStream(compress); > > OutputStream os = response.getOutputStream(contentType); > > TapestryInternalUtils.copy(is, os); > > is.close(); > is = null; > > os.close(); > } > finally > { > InternalUtils.close(is); > } > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Null-Pointer-Exception-tp5698238p5699340.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org