You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Checkoway <dc...@gmail.com> on 2011/07/24 16:40:27 UTC

JSP compile limitation 7.0.16 -> 7.0.19

I recently upgraded from 7.0.16 to 7.0.19, and having made no other changes
whatsoever, I've bumped into a new problem compiling long JSPs:

java.lang.Error: Unresolved compilation problem:


org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Granted, this JSP ends up generating java that's 7331 lines long, and 300k
in size...but it works absolutely fine in 7.0.16.  Did some sort of jasper
or compiler option change in 7.0.19?  I'm not sure if the generated source
got larger, or if the new version of tomcat is more restrictive.

I'm working on trimming my JSP down, which is something I need to do anyway,
but I wanted to raise this issue in case there's a simple fix.  I remember
in the past (6.0.x some time ago), tomcat used to give a more informative
error in this circumstance, indicating that class size or method size was
the issue.  Now the error is completely ambiguous...and it took me a little
while to figure out (read: guess) that method size was the issue.

Anyway, heads-up about this.  Thanks!

Dan

Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Mark Thomas <ma...@apache.org>.
On 25/07/2011 13:56, Dan Checkoway wrote:
> Mark,
> 
> I don't see anything mentioned in there about compiler options changing.  I
> only see the note about the JSP compile *strategy* (forward/backward
> dependency checks).

You missed this entry:

"Update to Eclipse JDT Compiler 3.7"

> You can toss "RTFM" (or RTFChangelog) at me, but something that's not listed
> in the changelog did change from 7.0.16 to 7.0.19 with respect to "max
> method size" or something of that nature.  I'll assume I'm not the only
> lonely soul out here who's going to bump into this...

I haven't confirmed that the updated compiler is the source of this
issue but it is certainly a candidate.

Mark


> 
> Dan
> 
> On Mon, Jul 25, 2011 at 4:33 AM, Mark Thomas <ma...@apache.org> wrote:
> 
>> On 24/07/2011 15:40, Dan Checkoway wrote:
>>> Did some sort of jasper
>>> or compiler option change in 7.0.19?
>>
>> Yes. See the Jasper section of the change log.
>>
>> Mark
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Dan Checkoway <dc...@gmail.com>.
Mark,

I don't see anything mentioned in there about compiler options changing.  I
only see the note about the JSP compile *strategy* (forward/backward
dependency checks).

You can toss "RTFM" (or RTFChangelog) at me, but something that's not listed
in the changelog did change from 7.0.16 to 7.0.19 with respect to "max
method size" or something of that nature.  I'll assume I'm not the only
lonely soul out here who's going to bump into this...

Dan

On Mon, Jul 25, 2011 at 4:33 AM, Mark Thomas <ma...@apache.org> wrote:

> On 24/07/2011 15:40, Dan Checkoway wrote:
> > Did some sort of jasper
> > or compiler option change in 7.0.19?
>
> Yes. See the Jasper section of the change log.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Mark Thomas <ma...@apache.org>.
On 24/07/2011 15:40, Dan Checkoway wrote:
> Did some sort of jasper
> or compiler option change in 7.0.19?

Yes. See the Jasper section of the change log.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Dan Checkoway <dc...@gmail.com>.
Line 593 has what you might expect...the long method generated from the JSP:

  public void _jspService(final javax.servlet.http.HttpServletRequest
request, final javax.servlet.http.HttpServletResponse response)

Dan

On Sun, Jul 24, 2011 at 6:04 PM, Pid <pi...@pidster.com> wrote:

> On 24/07/2011 15:48, Dan Checkoway wrote:
> > In case this helps, here are some generated source specs for comparison:
> >
> > file sizes:
> > -rw-r--r--  1 dan  staff  298619 Jul 24 10:46
> 7.0.16-generated-source.java
> > -rw-r--r--  1 dan  staff  300421 Jul 24 10:46
> 7.0.19-generated-source.java
> >
> > line counts:
> >     7328 7.0.16-generated-source.java
> >     7331 7.0.19-generated-source.java
> >
> > They're roughly identical.  The diffs are essentially:
> >
> > 3,4c3,7
> > <  * Version: Apache Tomcat/7.0.16
> > <  * Generated at: 2011-07-24 14:45:00 UTC
> > ---
> >>  * Version: Apache Tomcat/7.0.19
> >>  * Generated at: 2011-07-24 14:27:53 UTC
> >>  * Note: The last modified time of this file was set to
> >>  *       the last modified time of the source file after
> >>  *       generation to assist with modification tracking.
> > 516c519
> > <   private static java.util.List<java.lang.String> _jspx_dependants;
> > ---
> >>   private static java.util.Map<java.lang.String,java.lang.Long>
> > _jspx_dependants;
> >
> > ...and then the list & map diffs follow.  But that's it.
> >
> > Dan
> >
> > On Sun, Jul 24, 2011 at 10:40 AM, Dan Checkoway <dcheckoway@gmail.com
> >wrote:
> >
> >> I recently upgraded from 7.0.16 to 7.0.19, and having made no other
> changes
> >> whatsoever, I've bumped into a new problem compiling long JSPs:
> >>
> >> java.lang.Error: Unresolved compilation problem:
> >>
> >>
> >>
> org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)
> >>     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> >>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>
> >>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
> >>
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
> >>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
> >>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>
> >> Granted, this JSP ends up generating java that's 7331 lines long, and
> 300k
> >> in size...but it works absolutely fine in 7.0.16.  Did some sort of
> jasper
> >> or compiler option change in 7.0.19?  I'm not sure if the generated
> source
> >> got larger, or if the new version of tomcat is more restrictive.
> >>
> >> I'm working on trimming my JSP down, which is something I need to do
> >> anyway, but I wanted to raise this issue in case there's a simple fix.
>  I
> >> remember in the past (6.0.x some time ago), tomcat used to give a more
> >> informative error in this circumstance, indicating that class size or
> method
> >> size was the issue.  Now the error is completely ambiguous...and it took
> me
> >> a little while to figure out (read: guess) that method size was the
> issue.
> >>
> >> Anyway, heads-up about this.  Thanks!
>
> What is at line 593 in the compiled JSP output?
>
>
> org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)
>
> ?
>
> p
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Pid <pi...@pidster.com>.
On 24/07/2011 15:48, Dan Checkoway wrote:
> In case this helps, here are some generated source specs for comparison:
> 
> file sizes:
> -rw-r--r--  1 dan  staff  298619 Jul 24 10:46 7.0.16-generated-source.java
> -rw-r--r--  1 dan  staff  300421 Jul 24 10:46 7.0.19-generated-source.java
> 
> line counts:
>     7328 7.0.16-generated-source.java
>     7331 7.0.19-generated-source.java
> 
> They're roughly identical.  The diffs are essentially:
> 
> 3,4c3,7
> <  * Version: Apache Tomcat/7.0.16
> <  * Generated at: 2011-07-24 14:45:00 UTC
> ---
>>  * Version: Apache Tomcat/7.0.19
>>  * Generated at: 2011-07-24 14:27:53 UTC
>>  * Note: The last modified time of this file was set to
>>  *       the last modified time of the source file after
>>  *       generation to assist with modification tracking.
> 516c519
> <   private static java.util.List<java.lang.String> _jspx_dependants;
> ---
>>   private static java.util.Map<java.lang.String,java.lang.Long>
> _jspx_dependants;
> 
> ...and then the list & map diffs follow.  But that's it.
> 
> Dan
> 
> On Sun, Jul 24, 2011 at 10:40 AM, Dan Checkoway <dc...@gmail.com>wrote:
> 
>> I recently upgraded from 7.0.16 to 7.0.19, and having made no other changes
>> whatsoever, I've bumped into a new problem compiling long JSPs:
>>
>> java.lang.Error: Unresolved compilation problem:
>>
>>
>> org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)
>>     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
>>
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
>>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>
>> Granted, this JSP ends up generating java that's 7331 lines long, and 300k
>> in size...but it works absolutely fine in 7.0.16.  Did some sort of jasper
>> or compiler option change in 7.0.19?  I'm not sure if the generated source
>> got larger, or if the new version of tomcat is more restrictive.
>>
>> I'm working on trimming my JSP down, which is something I need to do
>> anyway, but I wanted to raise this issue in case there's a simple fix.  I
>> remember in the past (6.0.x some time ago), tomcat used to give a more
>> informative error in this circumstance, indicating that class size or method
>> size was the issue.  Now the error is completely ambiguous...and it took me
>> a little while to figure out (read: guess) that method size was the issue.
>>
>> Anyway, heads-up about this.  Thanks!

What is at line 593 in the compiled JSP output?

org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)

?

p




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Dan Checkoway <dc...@gmail.com>.
In case this helps, here are some generated source specs for comparison:

file sizes:
-rw-r--r--  1 dan  staff  298619 Jul 24 10:46 7.0.16-generated-source.java
-rw-r--r--  1 dan  staff  300421 Jul 24 10:46 7.0.19-generated-source.java

line counts:
    7328 7.0.16-generated-source.java
    7331 7.0.19-generated-source.java

They're roughly identical.  The diffs are essentially:

3,4c3,7
<  * Version: Apache Tomcat/7.0.16
<  * Generated at: 2011-07-24 14:45:00 UTC
---
>  * Version: Apache Tomcat/7.0.19
>  * Generated at: 2011-07-24 14:27:53 UTC
>  * Note: The last modified time of this file was set to
>  *       the last modified time of the source file after
>  *       generation to assist with modification tracking.
516c519
<   private static java.util.List<java.lang.String> _jspx_dependants;
---
>   private static java.util.Map<java.lang.String,java.lang.Long>
_jspx_dependants;

...and then the list & map diffs follow.  But that's it.

Dan

On Sun, Jul 24, 2011 at 10:40 AM, Dan Checkoway <dc...@gmail.com>wrote:

> I recently upgraded from 7.0.16 to 7.0.19, and having made no other changes
> whatsoever, I've bumped into a new problem compiling long JSPs:
>
> java.lang.Error: Unresolved compilation problem:
>
>
> org.apache.jsp.mydir.my_005fexample_jsp._jspService(my_005fexample_jsp.java:593)
>     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>
> Granted, this JSP ends up generating java that's 7331 lines long, and 300k
> in size...but it works absolutely fine in 7.0.16.  Did some sort of jasper
> or compiler option change in 7.0.19?  I'm not sure if the generated source
> got larger, or if the new version of tomcat is more restrictive.
>
> I'm working on trimming my JSP down, which is something I need to do
> anyway, but I wanted to raise this issue in case there's a simple fix.  I
> remember in the past (6.0.x some time ago), tomcat used to give a more
> informative error in this circumstance, indicating that class size or method
> size was the issue.  Now the error is completely ambiguous...and it took me
> a little while to figure out (read: guess) that method size was the issue.
>
> Anyway, heads-up about this.  Thanks!
>
> Dan
>

Re: JSP compile limitation 7.0.16 -> 7.0.19

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/24 Dan Checkoway <dc...@gmail.com>:
> I recently upgraded from 7.0.16 to 7.0.19, and having made no other changes
> whatsoever, I've bumped into a new problem compiling long JSPs:
>
> java.lang.Error: Unresolved compilation problem:

Didn't you forget to clear all compiled jsps from
${catalina.base}/work/ after upgrading?

Is this issue reproducible? Can you provide a test case?

I do not think that method size can result in such compilation error.
(There might be errors due to size, but IIRC those are different
ones).

In 7.0.19 vs 7.0.16 there are differences in

a) how compilation time is stored in a class file
b) how tags attributes are mapped to properties in tag files,  though
this change should be backward compatible
c) Eclipse JDT Compiler used to compile JSP pages was upgraded from
3.6.2 to 3.7.


If c) is the cause you can take "ecj-*.jar" from older version of
Tomcat 7 instead of ecj-3.7.jar. They are compatible.  Anyway, you
have to remove compiled classes first.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org