Issue 10407

Search string ending in blank throws Exception

10407
Reporter: ahahn
Type: Bug
Summary: Search string ending in blank throws Exception
Priority: Major
Resolution: CantReproduce
Status: Closed
Created: 2011-11-15 15:19:25.188
Updated: 2013-08-29 14:44:45.196
Resolved: 2011-11-16 16:13:26.611
        
Description: http://staging.gbif.org:8080/portal-web-dynamic/species/?url=species
Entering a search term like "Puma ", ending in a blank character, leads to the following exception:

freemarker.core.InvalidReferenceException: Expression classification.get(usageKey) is undefined on line 56, column 113 in WEB-INF/pages/species/search.ftl.
	freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
	freemarker.core.Expression.getStringValue(Expression.java:118)
	freemarker.core.Expression.getStringValue(Expression.java:93)
	freemarker.core.DollarVariable.accept(DollarVariable.java:76)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.MixedContent.accept(MixedContent.java:92)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
	freemarker.core.Environment.visit(Environment.java:428)
	freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.MixedContent.accept(MixedContent.java:92)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
	freemarker.core.Environment.visit(Environment.java:428)
	freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.MixedContent.accept(MixedContent.java:92)
	freemarker.core.Environment.visit(Environment.java:221)
	freemarker.core.Environment.process(Environment.java:199)
	freemarker.template.Template.process(Template.java:237)
	org.apache.struts2.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:201)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
	com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
	com.google.inject.struts2.Struts2Factory$ProvidedInterceptor.intercept(Struts2Factory.java:215)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:88)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
	com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:82)
	com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
	com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
	com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
	com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
]]>
    


Author: ahahn@gbif.org
Comment: The issue does not occur any longer today. Maybe fixed as an effect of other changes in species pages today?
Created: 2011-11-16 16:13:26.629
Updated: 2011-11-16 16:13:26.629