You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/07/23 10:17:58 UTC

DO NOT REPLY [Bug 51544] New: EL parser problem for EmptyList

https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

             Bug #: 51544
           Summary: EL parser problem for EmptyList
           Product: Tomcat 7
           Version: 7.0.19
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: glamd@abv.bg
    Classification: Unclassified


When I return Collections.emptyList() and then use ${list.isEmpty()} in a JSP,
a problem occurs (see below). It didn't occur in older Tomcat 7 versions (like
7.0.5).

15:             ${user.names}<br />
16:         </div>
17:     </c:forEach>
18:     <c:if test="${users.isEmpty()}">
19:         <div>${msg.noResults}</div>
20:     </c:if>
21: </div>


Stacktrace:] with root cause
java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access
a member of class java.util.Collections$EmptyList with modifiers "public"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
    at java.lang.reflect.Method.invoke(Method.java:607)
    at javax.el.BeanELResolver.invoke(BeanELResolver.java:467)
    at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)
    at org.apache.el.parser.AstValue.getValue(AstValue.java:159)
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
    at
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:985)
    at
org.apache.jsp.WEB_002dINF.jsp.externalUsers_jsp._jspx_meth_c_005fif_005f2(externalUsers_jsp.java:2060)
    at
org.apache.jsp.WEB_002dINF.jsp.externalUsers_jsp._jspService(externalUsers_jsp.java:396)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
    at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
    at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
    at
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    at
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
    at
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1120)
    at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:890)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

--- Comment #4 from Mark Thomas <ma...@apache.org> 2011-07-25 10:36:51 UTC ---
Gump is running open JDK:

java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.8)
(6b20-1.9.8-0ubuntu1~10.04.1) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed
mode)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

--- Comment #6 from bozho <gl...@abv.bg> 2011-07-25 10:46:04 UTC ---
it's still in testing mode, hence the -client VM. I will change to -server, but
I guess it will still be there.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Mark Thomas <ma...@apache.org> 2011-07-25 16:23:38 UTC ---
Fixed in 7.0.x and will be included in 7.0.20 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

--- Comment #7 from Mark Thomas <ma...@apache.org> 2011-07-25 14:05:50 UTC ---
I took a look at the Oracle and OpenJDK implementations of emptyList(). If I
modify the test to use size() rather than isEmpty() it fails on the Oracle JDK
as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

--- Comment #5 from bozho <gl...@abv.bg> 2011-07-25 10:44:31 UTC ---
Hi,

My version is:

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.1) (amazon-44.1.9.1.18.amzn1-i386)
OpenJDK Client VM (build 19.0-b06, mixed mode)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-07-24 11:14:51 UTC ---
I have added unit tests for this in Tomcat 7 that access the list in EL as a
property of a bean, in EL directly and from within a JSP and all pass.

At this points it looks an application issue.

If you still see this problem with the latest Tomcat 7 release then to re-open
this issue you'll need to provide the simplest possible JSP that demonstrates
this issue.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> 2011-07-25 09:30:50 UTC ---
Gump caught this error with the tests that Mark wrote for this issue.

Testsuite: org.apache.el.TestValueExpressionImpl
Tests run: 7, Failures: 0, Errors: 2, Time elapsed: 0.131 sec
Failed:
- testBug51544Bean
- testBug51544Direct

Testsuite: org.apache.el.TestELInJsp
Tests run: 14, Failures: 0, Errors: 1, Time elapsed: 23.259 sec
Failed:
- testBug51544

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


DO NOT REPLY [Bug 51544] EL parser problem for EmptyList

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51544

--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> 2011-07-25 10:31:29 UTC ---
Created attachment 27311
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27311
A copy of two files from gump output, 25 Jul 2011 08:58:47 (UTC)

1. I am attaching a copy from the logs produced by gump run

The log files are
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_file/TEST-org.apache.el.TestValueExpressionImpl.BIO.txt.html

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_file/TEST-org.apache.el.TestELInJsp.BIO.txt.html


2. I am not able to reproduce this in my environment (Sun JDK 6u26 32-bit,
WinXP): tested with BIO connector, like gump did. All tests run fine.

bozho, what version of java runtime are you using?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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