Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-3334

Empty component date parameter generates stacktrace

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.28.11, 2.30.01
    • 2.30.02, CMS-10.0-GA
    • None
    • Tiger Sprint 106

    Description

      A component with a parameter info class with a parameter of type 'date' will always generate a stack trace when rendered. The date value is then an empty string, which generates a parse exception.

      Steps to reproduce:
      1. in GoGreen, extend the BannerParamsInfo interface with the following:

      @Parameter(name = "bannerDate", displayName = "Date")
      Calendar getDate();

      2. rebuild and restart
      3. get the GoGreen homepage (http://localhost:8080/site)

      Expected: no errors in the logs
      Actual: the following error is logged several times:

      17.06.2015 16:54:08 WARN [org.hippoecm.hst.core.container.AbstractBaseOrderableValve.handleComponentExceptions():299] Component exception(s) found in page request, 'Request

      { method='GET', scheme='http', host='localhost:8080', requestURI='/site/', queryString='null'}

      '.
      17.06.2015 16:54:08 WARN [com.onehippo.gogreen.exceptions.CustomPageErrorHandler.handleComponentExceptions():39] Component exception found on com.onehippo.gogreen.components.common.Banner
      org.hippoecm.hst.core.component.HstComponentException: org.hippoecm.hst.core.component.HstParameterValueConversionException: java.text.ParseException: Unable to parse the date:
      at org.hippoecm.hst.core.container.HstComponentInvokerImpl.invokeBeforeRender(HstComponentInvokerImpl.java:153)
      at sun.reflect.GeneratedMethodAccessor184.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
      at org.hippoecm.hst.core.container.PersistableSessionAroundAdvice.invoke(PersistableSessionAroundAdvice.java:68)
      at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
      at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
      at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
      at org.hippoecm.hst.core.logging.HstComponentInvokerProfiler.profile(HstComponentInvokerProfiler.java:60)
      at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
      at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
      at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      at com.sun.proxy.$Proxy31.invokeBeforeRender(Unknown Source)
      at org.hippoecm.hst.core.container.AggregationValve.processWindowsBeforeRender(AggregationValve.java:401)
      at org.hippoecm.hst.core.container.AggregationValve.invoke(AggregationValve.java:135)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.ComponentRenderingValve.invoke(ComponentRenderingValve.java:36)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.PageCachingValve.invoke(PageCachingValve.java:64)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.ESIPageInfoScanningValve.invoke(ESIPageInfoScanningValve.java:79)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.PageInfoRenderingValve.invoke(PageInfoRenderingValve.java:50)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.ResourceServingValve.invoke(ResourceServingValve.java:42)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.ActionValve.invoke(ActionValve.java:48)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.LocalizationValve.invoke(LocalizationValve.java:96)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.ContextResolvingValve.invoke(ContextResolvingValve.java:65)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.JCRSessionStatefulConcurrencyValve.invoke(JCRSessionStatefulConcurrencyValve.java:56)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.SubjectBasedSessionValve.invoke(SubjectBasedSessionValve.java:58)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.SecurityValve.invoke(SecurityValve.java:177)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.CmsSecurityValve.invoke(CmsSecurityValve.java:82)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.InitializationValve.invoke(InitializationValve.java:50)
      at org.hippoecm.hst.core.container.HstSitePipeline$Invocation.invokeNext(HstSitePipeline.java:269)
      at org.hippoecm.hst.core.container.HstSitePipeline.invokeValves(HstSitePipeline.java:170)
      at org.hippoecm.hst.core.container.HstSitePipeline.invoke(HstSitePipeline.java:153)
      at org.hippoecm.hst.core.container.HstRequestProcessorImpl.processRequest(HstRequestProcessorImpl.java:79)
      at org.hippoecm.hst.container.HstDelegateeFilterBean.processResolvedSiteMapItem(HstDelegateeFilterBean.java:638)
      at org.hippoecm.hst.container.HstDelegateeFilterBean.doFilter(HstDelegateeFilterBean.java:351)
      at org.hippoecm.hst.container.DelegatingFilter.doFilter(DelegatingFilter.java:84)
      at org.hippoecm.hst.container.HstFilter.doFilter(HstFilter.java:51)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.hippoecm.hst.container.XSSUrlFilter.doFilter(XSSUrlFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:142)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.hippoecm.hst.core.component.HstParameterValueConversionException: java.text.ParseException: Unable to parse the date:
      at org.hippoecm.hst.utils.ParameterUtils$1.convert(ParameterUtils.java:78)
      at org.hippoecm.hst.core.component.HstParameterInfoProxyFactoryImpl$ParameterInfoInvocationHandler.invoke(HstParameterInfoProxyFactoryImpl.java:174)
      at com.sun.proxy.$Proxy105.getDate(Unknown Source)
      at com.onehippo.gogreen.components.common.Banner.doBeforeRender(Banner.java:44)
      at org.hippoecm.hst.core.container.HstComponentInvokerImpl.invokeBeforeRender(HstComponentInvokerImpl.java:135)
      ... 91 more
      Caused by: java.text.ParseException: Unable to parse the date:
      at org.apache.commons.lang.time.DateUtils.parseDateWithLeniency(DateUtils.java:359)
      at org.apache.commons.lang.time.DateUtils.parseDate(DateUtils.java:285)
      at org.hippoecm.hst.utils.ParameterUtils$1.convert(ParameterUtils.java:71)
      ... 95 more

      Attachments

        Issue Links

          Activity

            People

              pgupta Pankaj Gupta (Inactive)
              mdenburger Mathijs den Burger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: