Uploaded image for project: 'Gateway'
  1. Gateway
  2. GTWY-2610

Clicking "Download Selected Datasets" button generates Internal Server Error when zero dataset are selected

XMLWordPrintable

    • Icon: Defect Defect
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0-BETA1, 2.0.0
    • 2.0.0
    • None
    • None

      An exception is generated when clicking "Download Selected Datasets" in the search results page when no checkboxes are selected.

      This results in an ISE error page. We should have a better error page in this case IMO. Something like: "Please make a selection".

      We could consider disabling the button until a checkbox is selected as well.


      Error/trace follows:

      ESG Administrator wrote:
      > User Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110505 Firefox/3.6.17
      > Method: GET
      > ESKE Session Id: 274b4ab2-2d7e-428e-b625-bc36a473d23c
      > Server Port: 80
      > Server Name: search-esg.prototype.ucar.edu
      > Context Path: URL: /browse/viewCollectionFilesInitial.htm
      > Query String: selectAll=true
      >
      >
      > org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.orm.hibernate3.HibernateQueryException: unexpected end of subtree [
      >
      > from sgf.gateway.model.metadata.DatasetImpl dataset where dataset.identifier in ()
      >
      > ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [
      >
      > from sgf.gateway.model.metadata.DatasetImpl dataset where dataset.identifier in ()
      >
      > ]
      > at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
      > at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      > at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at sgf.gateway.web.filters.metrics.ClickstreamFilter.doFilter(ClickstreamFilter.java:75)
      > at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      > at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at sgf.gateway.web.filters.metrics.UserAgentFilter.doFilter(UserAgentFilter.java:86)
      > at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      > at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:366)
      > 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:378)
      > at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:89)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
      > at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      > at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167)
      > at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      > at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      > at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at sgf.gateway.web.filters.exception.UnhandledExceptionFilter.doFilter(UnhandledExceptionFilter.java:99)
      > at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      > at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
      > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
      > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
      > at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
      > at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
      > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
      > at java.lang.Thread.run(Thread.java:662)
      > Caused by: org.springframework.orm.hibernate3.HibernateQueryException: unexpected end of subtree [
      >
      > from sgf.gateway.model.metadata.DatasetImpl dataset where dataset.identifier in ()
      >
      > ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [
      >
      > from sgf.gateway.model.metadata.DatasetImpl dataset where dataset.identifier in ()
      >
      > ]
      > at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
      > at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
      > at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
      > at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)
      > at sgf.gateway.dao.metadata.impl.hibernate.DatasetRepositoryImpl.get(DatasetRepositoryImpl.java:120)
      > at sgf.gateway.web.controllers.browse.ViewDatasetFilesController$1.doInTransaction(ViewDatasetFilesController.java:114)
      > at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      > at sgf.gateway.web.controllers.browse.ViewDatasetFilesController.handleRequest(ViewDatasetFilesController.java:101)
      > at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      > at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      > at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      > at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      > ... 66 more
      > Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [
      >
      > from sgf.gateway.model.metadata.DatasetImpl dataset where dataset.identifier in ()
      >
      > ]
      > at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
      > at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
      > at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
      > at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:258)
      > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183)
      > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
      > at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
      > at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
      > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
      > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
      > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1140)
      > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      > at sgf.gateway.dao.metadata.impl.hibernate.DatasetRepositoryImpl$1.doInHibernate(DatasetRepositoryImpl.java:134)
      > at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
      > ... 75 more
      >
      >

              nhook Nathan Hook
              ejn Eric Nienhouse
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: