<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=gotilio" rel="nofollow">Eduardo Alberto Magdalena Aguin</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9676?redirect=false" rel="nofollow">SPR-9676</a></strong> and commented</p>
<p dir="auto">I have a DAO class which have an "update" operation consisting on deleting current record and inserting it again as a part of a batchInsert which is done is later but fails. those are the symptoms:</p>
<ol dir="auto">
<li>I delete the record with<br>
getJdbcTemplate().update("DELETE " + table + " WHERE " + pkName + "=" + pkValue + getRelPKCriteria(table, params));</li>
</ol>
<p dir="auto">If debugging, I check in Oracle and the record is no longer there.</p>
<ol start="2" dir="auto">
<li>Afterwards, the insertion batch is excuted when is ready by SimpleJdbcInsert:</li>
</ol>
<p dir="auto">try{<br>
getInsert(currentBatchTable).executeBatch(insertBatch.toArray(BATCH));<br>
} catch(DuplicateKeyException e){<br>
/* One by one we try to insert them and warn about the wrong ones */<br>
log.warn("Batch inserting failed, trying to do one by one insert...");<br>
stepByStepInsert();<br>
}</p>
<p dir="auto">It fails without inserting anything, but just in case to know whose is the responsible We "step by step" insert every of them:</p>
<p dir="auto">private void stepByStepInsert(){<br>
SimpleJdbcInsert insert = new SimpleJdbcInsert(dataSource);<br>
insert.setTableName(currentBatchTable);</p>
<p dir="auto">for(Map&lt;String, Object&gt; map : insertBatch){<br>
try{<br>
insert.execute(map);<br>
}catch(DuplicateKeyException e){<br>
log.error("Unexpected duplicated record: " + map);<br>
}<br>
}<br>
}</p>
<p dir="auto">But the result is even more strange, all the insert operations throw DuplicateKeyException and the one being originaly deleted also gets inserted with the new values (despite of throwing the claimed exception).</p>
<p dir="auto">The database is Oracle 11g</p>
<p dir="auto">The Driver is ojdbc6.jar</p>
<p dir="auto">And this is how the driver is configured:</p>
<p dir="auto">&lt;bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSourceXXX"&gt;<br>
&lt;property name="driverClassName" value="${database.driverClassName}" /&gt;<br>
&lt;property name="url" value="${database.url}" /&gt;<br>
&lt;property name="username" value="${database.usernameTrialpedia}" /&gt;<br>
&lt;property name="password" value="${database.passwordTrialpedia}" /&gt;<br>
&lt;property name="testOnBorrow" value="true" /&gt;<br>
&lt;property name="testOnReturn" value="true" /&gt;<br>
&lt;property name="testWhileIdle" value="true" /&gt;<br>
&lt;property name="defaultAutoCommit" value="true" /&gt;<br>
&lt;property name="timeBetweenEvictionRunsMillis" value="1800000" /&gt;<br>
&lt;property name="numTestsPerEvictionRun" value="3" /&gt;<br>
&lt;property name="minEvictableIdleTimeMillis" value="1800000" /&gt;<br>
&lt;property name="validationQuery" value="SELECT 1 FROM DUAL" /&gt;<br>
&lt;/bean&gt;<br>
If the cause is ignorance on my part please excuse me any troubles caused.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.2</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=hathanhthai" rel="nofollow">Thai Ha</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7482?redirect=false" rel="nofollow">SPR-7482</a></strong> and commented</p>
<p dir="auto">I have a JSP page using spring:eval tag as below</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;spring:eval expression=&quot;command.products&quot; var=&quot;items&quot; /&gt;"><pre class="notranslate">&lt;<span class="pl-ent">spring</span><span class="pl-ent">:</span><span class="pl-ent">eval</span> <span class="pl-e">expression</span>=<span class="pl-s"><span class="pl-pds">"</span>command.products<span class="pl-pds">"</span></span> <span class="pl-e">var</span>=<span class="pl-s"><span class="pl-pds">"</span>items<span class="pl-pds">"</span></span> /&gt;</pre></div>
<p dir="auto">When run the mvn jetty:run command (both jetty 6.1.22 and jetty 6.1.25), I always receive the below NullPointerException (see the stacktrace at the bottom) when I access JSP page on the second time (I don't receive any error for the first time).After debugging the code, I find out that sometimes EvalTag reuses instance variable evaluationContext for the next requests, which was initialized with the PageContext of the some previous request. Here is the code which caching evaluationContext through many requests</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (this.evaluationContext == null) {
    this.evaluationContext = createEvaluationContext(pageContext);
}
.... 
String result = this.expression.getValue(this.evaluationContext, String.class);
..."><pre class="notranslate"><code class="notranslate">if (this.evaluationContext == null) {
    this.evaluationContext = createEvaluationContext(pageContext);
}
.... 
String result = this.expression.getValue(this.evaluationContext, String.class);
...
</code></pre></div>
<p dir="auto">Here are the steps which lead to the exception:</p>
<ol dir="auto">
<li>User sends a request to page</li>
<li>Jetty creates EvalTag#1, which will initialize EvalTag#1.evaluationContext using PageContextImpl#1 (at the moment, PageContextImpl#1.request=HttpServletRequest#1). The tag will be called successfully.</li>
<li>Result is returned to user.</li>
<li>Jetty recycles PageContextImpl#1 by calling release() method. PageContextImpl#1.request=null<br>
Jetty recycles EvalTag#1 by calling release() method. But EvalTag#1.evaluationContext still != null.  EvalTag#1.evaluationContext still have references to PageContextImpl#1 indirectly</li>
<li>User clicks Refresh button to reload the page</li>
<li>Jetty reuses EvalTag#1 to evaluate expression and as a result, the old value of EvalTag#1.evaluationContext is also be reused. This time Jetty creates a new object PageContextImpl#2 (note: somehow Jetty doesn't reuse the PageContextImpl#1 here on my page). At the moment, Jetty will throw NPE when EvalTag#1.doEndTag() is called because EvalTag#1.evaluationContext...PageContextImpl#1.request is null (it should be EvalTag#1.evaluationContext...PageContextImpl#2.request)</li>
</ol>
<p dir="auto">For other pages (which this NPE doesn't happen), at step 7 the PageContextImpl#1 is reused by Jetty and PageContextImpl#1.request is initialized correctly by Jetty so the NPE doesn't happen.</p>
<p dir="auto">I think EvalTag.evaluationContext should NOT be cached to avoid this error.</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="2010-08-21 21:40:13,093 [501538@qtp-18977449-3] ERROR [org.mortbay.log] - Nested in org.apache.jasper.JasperException: org.springframework.expression.spel.SpelEvaluationException: EL1021E:(pos 0): A problem occurred whilst attempting to access the property 'command': 'Unexpected exception occurred accessing 'command' as an implicit variable':
org.springframework.expression.spel.SpelEvaluationException: EL1021E:(pos 0): A problem occurred whilst attempting to access the property 'command': 'Unexpected exception occurred accessing 'command' as an implicit variable'
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:199)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:71)
	at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:52)
	at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88)
	at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:108)
	at org.apache.jsp.search_jsp._jspx_meth_spring_eval_3(org.apache.jsp.search_jsp:320)
	at org.apache.jsp.search_jsp._jspService(org.apache.jsp.search_jsp:120)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:59)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1031)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:815)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:80)
	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at myapp.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.multipart.support.MultipartFilter.doFilterInternal(MultipartFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.springframework.expression.AccessException: Unexpected exception occurred accessing 'command' as an implicit variable
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.resolveImplicitVariable(EvalTag.java:186)
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.canRead(EvalTag.java:159)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:189)
	... 102 more
Caused by: java.lang.NullPointerException
	at org.apache.jasper.runtime.PageContextImpl.doFindAttribute(PageContextImpl.java:541)
	at org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:527)
	at javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:123)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at org.apache.jasper.runtime.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:97)
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.resolveImplicitVariable(EvalTag.java:183)
	... 104 more"><pre class="notranslate">2010-08-21 21:40:13,093 [501538@qtp-18977449-3] ERROR [org.mortbay.log] - Nested in org.apache.jasper.JasperException: org.springframework.expression.spel.SpelEvaluationException: EL1021E:(pos 0): A problem occurred whilst attempting to access the property 'command': 'Unexpected exception occurred accessing 'command' as an implicit variable':
org.springframework.expression.spel.SpelEvaluationException: EL1021E:(pos 0): A problem occurred whilst attempting to access the property 'command': 'Unexpected exception occurred accessing 'command' as an implicit variable'
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:199)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:71)
	at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:52)
	at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93)
	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88)
	at org.springframework.web.servlet.tags.EvalTag.doEndTag(EvalTag.java:108)
	at org.apache.jsp.search_jsp._jspx_meth_spring_eval_3(org.apache.jsp.search_jsp:320)
	at org.apache.jsp.search_jsp._jspService(org.apache.jsp.search_jsp:120)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:59)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1031)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:815)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
	at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:80)
	at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at myapp.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.multipart.support.MultipartFilter.doFilterInternal(MultipartFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:440)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.springframework.expression.AccessException: Unexpected exception occurred accessing 'command' as an implicit variable
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.resolveImplicitVariable(EvalTag.java:186)
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.canRead(EvalTag.java:159)
	at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:189)
	... 102 more
Caused by: java.lang.NullPointerException
	at org.apache.jasper.runtime.PageContextImpl.doFindAttribute(PageContextImpl.java:541)
	at org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:527)
	at javax.servlet.jsp.el.ScopedAttributeELResolver.getValue(ScopedAttributeELResolver.java:123)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at org.apache.jasper.runtime.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:97)
	at org.springframework.web.servlet.tags.EvalTag$JspPropertyAccessor.resolveImplicitVariable(EvalTag.java:183)
	... 104 more</pre></div>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398108042" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12294" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12294/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12294">#12294</a> spring:eval causes SpelEvaluationException when page is opened in second user-session (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">3 votes, 5 watchers</p>