Bug 38211 - Unable to compiler JSP-Files with Tomcat > 5.5.9
Summary: Unable to compiler JSP-Files with Tomcat > 5.5.9
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: Nightly Build
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Keywords: ErrorMessage
Depends on:
Reported: 2006-01-10 11:13 UTC by Stefan Kirchner
Modified: 2006-07-24 02:19 UTC (History)
2 users (show)

JSP Page Test Buggy (274 bytes, application/octet-stream)
2006-07-21 08:34 UTC, Nicolas Ternisien
Generated Java file with 5.5.17 Jasper (2.21 KB, application/octet-stream)
2006-07-21 08:39 UTC, Nicolas Ternisien
Generated Java file with 5.5.9 Jasper (the one which works) (2.22 KB, application/octet-stream)
2006-07-21 08:39 UTC, Nicolas Ternisien

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Kirchner 2006-01-10 11:13:46 UTC
Environment: Windows XP, JRE 1.5.0_06, Tomcat 5.5.15 and 5.5.12

1. I tried to update my Tomcat version from 5.5.9 to 5.5.15
2. When I access to the first login page, the following error message comes up:
 	org.apache.jasper.JasperException: Unable to compile class for JSP
 	Generated servlet error:
 	The type Collection is not generic; it cannot be parameterized with arguments
<? extends E>

When I use the Jasper Compiler from Tomcat 5.5.9, everything is doing fine.
Comment 1 Johan Ferner 2006-02-05 16:21:58 UTC
Sorry to be a "me too" but I'm seeing this on:
Solaris 8 sparc, JDK 1.5.0_06, Tomcat 5.5.15.

Changing the jasper files worked for me. Unfortunately I'm deploying a
commercial app so I can't play around. This app works on JRE 1.4 so no generics....
Comment 2 Nicolas Ternisien 2006-07-21 08:34:38 UTC
Created attachment 18620 [details]
JSP Page Test Buggy
Comment 3 Nicolas Ternisien 2006-07-21 08:38:01 UTC
And another "me too", We're also unable to compile a simple JSP because Javac
Compiler generates strange Generic compilation problem with Tomcat 5.5.17.

org.apache.jasper.JasperException: Impossible de compiler la classe pour la JSP

Une erreur s'est produite à la ligne: 2 dans le fichier jsp: /test.jsp
Erreur de servlet générée:
The type Map is not generic; it cannot be parameterized with arguments <?
extends K, ? extends V>

With JSP generation using JAR files of Jasper (located in common/lib of Tomcat)
5.5.9, it works correctly.

I provided attached JSP which cannot compile, and Java generated files, with
5.5.9 and 5.5.17

Output of JSP with 5.5.9 is :

Result is : Hop
(normal output)
Comment 4 Nicolas Ternisien 2006-07-21 08:39:04 UTC
Created attachment 18621 [details]
Generated Java file with 5.5.17 Jasper
Comment 5 Nicolas Ternisien 2006-07-21 08:39:36 UTC
Created attachment 18622 [details]
Generated Java file with 5.5.9 Jasper (the one which works)
Comment 6 Rainer Jung 2006-07-21 08:52:10 UTC
You JSP works for me with TC 5.5.17/Java 1.5.0_06 (Solaris Sparc):

Result is :

No errors or other strangeness.
Comment 7 Nicolas Ternisien 2006-07-21 12:34:22 UTC
We're also using JDK version "1.5.0_06", with the Server HotSpot VM, under a Red
Hat RHEL 3 Linux, hope it can help.
Comment 8 Filip Hanik 2006-07-21 12:35:57 UTC
Works fine on apache-tomcat-5.5.17.zip on Fedora Core 4, JDK 1.5.0_07
Are you sure you haven't changed your compilerTargetVM and compilerSourceVM in

Please try on 5.5.17 and reopen if it exists in there, we'll work through it.
Comment 9 Filip Hanik 2006-07-21 12:45:15 UTC
I just tested 5.5.15, 16 and 17 all work fine.

are you sure you're not using GNU java or something else installed on your system?
Comment 10 Nicolas Ternisien 2006-07-21 13:42:15 UTC
No Jasper options defined in conf/web.xml (compilerTargetVM and compilerSourceVM)

I'm now using JDK 1.5.07, without any GNU Classpath nor Kaffe, and it still
cannot compile
Comment 11 Filip Hanik 2006-07-21 14:00:44 UTC
Can you zip up your tomcat directory and put it somewhere for me to download I
will run the same test over here
Comment 12 Nicolas Ternisien 2006-07-24 09:19:36 UTC
I finally found what was the problem, and Tomcat was not in charge of this problem.

Our webapp included a JAR called rt4.jar in WEB-INF/lib, and after some search,
this JAR contained the java.util.Map interface !!! This interface was used to
compile the JSP (strange that it was used against the standard Map from the
API), and finally generate the output.

Thanks everybody for your help, and sorry to report a false bug.