tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 37084] JspC from ant fails on JSPs that use custom taglib
Date Sat, 03 Jan 2009 16:31:41 GMT

Konstantin Kolinko <> changed:

           What    |Removed                     |Added
           Severity|regression                  |normal
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |

--- Comment #10 from Konstantin Kolinko <>  2009-01-03 08:31:39
PST ---
Though I am yet failing to reproduce the issue in current tc6.0.x, I have
elaborated a theory why it occurs.

1. The exception is caused by creating JasperLoader instance with
a null baseUrl and trying to use it to load a class, in

Usually that does not occur, because JspCompilationContext#createOutputDir() is
called first.

2. During compilation the #createOutputDir() call does occur: a) in
Compiler#isOutDated() when it checks for the full name of the java source /
class file, b) later, when Compiler#generateJava() explicitly calls

Thus, the compilation is not the route that leads to the preliminary creation
of JasperLoader instance.

3. I think that the issue is caused when JspServletWrapper#getDependants() gets
called earlier than the compilation of the class occurs.

The events will occur as following:
1) JspServletWrapper#getDependants() calls JspCompilationContext#load() that
results in #getJspLoader() call and creation of JasperLoader instance. 
2) The JasperLoader instance is unusable and this call results in an exception.
Nevertheless the created JasperLoader instance is remembered.
3) JspServletWrapper#getDependants() catches the exception, but silently
swallows it.
4) The program continues running but breaks later.

Thus, the question is what can cause the early #getDependants() call on a fresh
compilation context. I am not able to reproduce it. Maybe there should be some
interrelated tag/jsp files (OP mentioned: "Seems to be related to the use of a
custom taglib in a JSP that is included by another JSP", but that is not
sufficient). Also, the known workaround for the issue (disabling caching in
JspC) should somehow fit into the picture.

Nevertheless, I am proposing a patch to TC 6.0, that I attached above. A side
effect is that it mkdirs the output directory, but I think that must be OK.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message