users@glassfish.java.net

Re: Unable to initialize TldScanner

From: <glassfish_at_javadesktop.org>
Date: Fri, 07 Aug 2009 04:45:47 PDT

Update 2:
I could find the cause and a workaround for this problem.
In the jsp-impl code for the TldScanner, there is a method scanTlds(). This one
scanTlds() is called by onStartup (..) and after scanTlds() is called, ctxt.setAttribute(Constants.JSP_TLD_URI_TO_LOCATION_MAP, mappings) is called which set the TLD locations. In case scanTlds() throws an exception, the ctxt.setAttribute() is never called.

In the case of the failing webapp, scanTlds() indeed throws an Exception, in the scanJars() method. In my case, scanJar will try to open jar:file:/home/johan/lab/DaliCompare/dist/gfdeploy/DaliCompare-ejb.jar which does not exist (there is a directory DaliCompare-ejb_jar though).
I don't know why this file should exist, but catching the Exception in the scanJars() method solves the problem (since the scanTlds() then returns without an exception).

- Johan
[Message sent by forum member 'johanvos' (johanvos)]

http://forums.java.net/jive/thread.jspa?messageID=359400