Bug 29160 - precompile problem: _jspx_meth_* (javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) cannot be applied to (org.apache.struts.taglib.*.*Tag,javax.servlet.jsp.PageContext)
Summary: precompile problem: _jspx_meth_* (javax.servlet.jsp.tagext.JspTag,javax.servl...
Status: CLOSED INVALID
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.0.24
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL: http://jakarta.apache.org/tomcat/tomc...
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-23 16:05 UTC by Ralf Hauser
Modified: 2009-07-16 13:55 UTC (History)
1 user (show)



Attachments
one sample jsp.java that causes these errors (14.19 KB, application/octet-stream)
2004-05-25 04:10 UTC, Ralf Hauser
Details
sample_jsp.tgz - this time the correct one, pls discard the previous (7.96 KB, application/octet-stream)
2004-05-25 04:23 UTC, Ralf Hauser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser 2004-05-23 16:05:12 UTC
as per the above URL, I am trying to precompile my jsps for a struts-based web-app.

Suggestion 1: Mention there that with 300 jsp's, java will run out of memory,
but extending /usr/local/bin/ant
   ANT_OPTS=" -Xmx512m "
can remedy that.

Next problem with the jsp-"compile" target:

About 100 errors of the following kind

<<_jspx_meth_html_link_9(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext)
in org.apache.jsp.my_jsp cannot be applied to
(org.apache.struts.taglib.logic.GreaterEqualTag,javax.servlet.jsp.PageContext)>>

This basically happens to all tags that are happily compiled at deploy time.
(i.e.: _jspx_meth_logic_notPresent_4, _jspx_meth_logic_greaterThan_2,
_jspx_meth_bean_write_7, _jspx_meth_html_form_0, ...)

Suggestion 2: It would be great to tell what ant doesn't get when started on the
command line that tomcat does nicely when running the webapp.
Comment 1 Ralf Hauser 2004-05-25 04:10:56 UTC
Created attachment 11644 [details]
one sample jsp.java that causes these errors
Comment 2 Ralf Hauser 2004-05-25 04:17:26 UTC
> From: Jan Luehe [mailto:Jan.Luehe@Sun.COM]
> Sent: Tuesday, May 25, 2004 1:35 AM
> To: hauser@acm.org
> Subject: Re: DO NOT REPLY [Bug 29160] New: - precompile problem:
> 
> Any chance you could attach your webapp to the bugreport, or
> send me a copy?
hope you can already reproduce it with the attached one sample.tgz file that is
created by my jspc.
When doing the target compile(jsp), I get
    [javac] 27 errors
    [javac] 10 warnings
Comment 3 Ralf Hauser 2004-05-25 04:23:41 UTC
Created attachment 11645 [details]
sample_jsp.tgz - this time the correct one, pls discard the previous
Comment 4 Jan Luehe 2004-05-25 22:16:18 UTC
Can you attach your original webapp WAR file that contains the JSP pages and
bundles the struts taglib?
Comment 5 Jan Luehe 2004-05-26 22:03:24 UTC
I was able to precompile the sample webapps that come with the struts 1.1
distribution.

I don't understand this error message you are getting:

<<_jspx_meth_html_link_9(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext)
in org.apache.jsp.my_jsp cannot be applied to
(org.apache.struts.taglib.logic.GreaterEqualTag,javax.servlet.jsp.PageContext)>>

Notice that javax.servlet.jsp.tagext.JspTag, which was added in JSP 2.0, is a
superinterface of javax.servlet.jsp.tagext.Tag, which is extended by
javax.servlet.jsp.tagext.IterationTag, which is implemented by
javax.servlet.jsp.tagext.TagSupport, which is extended by
org.apache.struts.taglib.logic.GreaterEqualTag, so the above assignment should
be OK.

Adding a superinterface such as javax.servlet.jsp.tagext.JspTag is
backward-compatible which existing tag handlers.

What javac are you using?
Comment 6 Ralf Hauser 2004-05-27 10:10:55 UTC
Jan, Thanks for staying on this - sorry, can't just give out the full war.
my javac was installed the same day this February as 
<<java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)>>

I had the struts.jar (1.1) twice in the classpath, but fixing this didn't solve
the problem.
Comment 7 Jan Luehe 2004-05-27 18:03:26 UTC
I'm closing this a not a bug, because
- I'm able to precompile the sample webapps that come with struts 1.1.
- I'm able to manually compile the .java files in your attachment.

It seems you are somehow referencing an old servlet-api.jar that contains JSP
1.2 based interfaces in your environment.


Comment 8 Ralf Hauser 2004-05-28 15:30:14 UTC
must have been a classloader problem, i.e. it may have found some of the jars
twice. 
When I only take the classpath:
WEB-INF/classes:tomcat/common/lib:struts.jar:displaytag-1.0-b2.jar

or Jan's 
javac -classpath jsp-api.jar:servlet-api.jar:jasper-runtime.jar:struts.jar:.
<java-filename>

it does compile!
Thx!