Bug 45648 - Function 'f:length' not found
Function 'f:length' not found
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Jasper
6.0.18
PC Windows XP
: P3 regression (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-08-18 19:54 UTC by Carlos Costa e Silva
Modified: 2008-09-25 03:42 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Costa e Silva 2008-08-18 19:54:44 UTC
This error happens when accessing the Proxy Connectors page in an Apache Archiva 1.1.1 installation: http://localhost:8080/archiva/admin/proxyConnectors.action


This error happens against a build exported from trunk on 2008/08/14 (I'm using this build, to work around bug https://issues.apache.org/bugzilla/show_bug.cgi?id=45511 - EL "empty" keyword does not work, which also happens with Archiva). This error seems very similar to 45511.



Significant part of the stack trace:

org.apache.jasper.JasperException: /WEB-INF/jsp/admin/proxyConnectors.jsp(76,2) "${fn:length(repository.value)}" contains invalid expression(s): javax.el.ELException: Function 'f:length' not found
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
	org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1132)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:813)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:832)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:832)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:832)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
	org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
	org.apache.jasper.compiler.Validator.validate(Validator.java:1713)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:321)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	com.opensymphony.webwork.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:114)
	com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)
...
Comment 1 Carlos Costa e Silva 2008-08-18 19:59:44 UTC
Note: 

The "build exported from trunk on 2008/08/14" means this bug happens against a tomcat build exported from svn on that date. The Archiva build is a "stock" 1.1.1.

Obs: Changed priority to P3 and severity to regression.
Comment 2 Carlos Costa e Silva 2008-08-20 09:04:29 UTC
Another note: this problem doesn't happen with tomcat 6.0.16.
Comment 3 Carlos Costa e Silva 2008-08-20 11:39:05 UTC
Deployed a CAS server v3.3 and found this in the logs:

javax.el.ELException: Function 'f:escapeXml' not found
	at org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:171)
	at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:145)
...
Comment 4 Donald Woods 2008-08-21 06:36:00 UTC
I ran into the same problem.
Copying the ELParser files from tc6.0.x/trunk (6.0.19) over the 6.0.18 files and rebuilding fixed this problem, but now I'm seeing other JSP TCK failures....

Comment 5 Konstantin Kolinko 2008-08-22 05:18:11 UTC
I am confirming that it is reproducible with the examples app bundled with Tomcat, with the current top of tc6.0.x branch (2008-08-22, rev.688071).

The page that fails is /examples/jsp/jsp2/el/functions.jsp
From the root application, click JSP Examples. That page is the 4th example there ("Functions" in the JSP 2.0 Examples group).

The issue disappears if I rollback to rev.685696 of 2008-08-14.

The released version 6.0.18 is not affected. I tested the page there
and it works.
Comment 6 Mark Thomas 2008-08-31 12:45:52 UTC
This has been fixed in trunk and proposed for 6.0.x
Comment 7 Carlos Costa e Silva 2008-09-02 05:19:13 UTC
Confirm fixed: works for me with the latest revision from trunk.
Comment 8 Mark Thomas 2008-09-25 03:36:58 UTC
This has been fixed in 6.0.x and will be in 6.0.19 onwards.