GeoServer
  1. GeoServer
  2. GEOS-3607

Layer preview breaks if any output format returns an empty set of formats

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: UI
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When navigation to "Layer Preview" page I get the following exception:

      monospaced
      org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.geoserver.web.demo.MapPreviewPage() at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:206) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:272) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:293) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:532) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41) 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:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:186) ... 69 more Caused by: java.util.NoSuchElementException at java.util.concurrent.ConcurrentHashMap$HashIterator.nextEntry(ConcurrentHashMap.java:1099) at java.util.concurrent.ConcurrentHashMap$KeyIterator.next(ConcurrentHashMap.java:1117) at org.geoserver.web.demo.MapPreviewPage.getAvailableWFSFormats(MapPreviewPage.java:120) at org.geoserver.web.demo.MapPreviewPage.<init>(MapPreviewPage.java:51) ... 73 more
      monospaced

        Activity

        Hide
        Andrea Aime added a comment -

        Hi, I've just tried adding the OGR output format to my GeoServer install and I still cannot reproduce the error above. Did you manually configure the available formats for OGR by creating the ogr2ogr.xml config file as described here: http://docs.geoserver.org/trunk/en/user/extensions/ogr.html?
        Or else, may it be that ogr2ogr was simply not in your path?

        Show
        Andrea Aime added a comment - Hi, I've just tried adding the OGR output format to my GeoServer install and I still cannot reproduce the error above. Did you manually configure the available formats for OGR by creating the ogr2ogr.xml config file as described here: http://docs.geoserver.org/trunk/en/user/extensions/ogr.html? Or else, may it be that ogr2ogr was simply not in your path?
        Hide
        Kasper Thuno added a comment -

        I didn't configure it using ogr2ogr.xml nor did I have the ogr2ogr.exe in the path I believe... But still it's kinda hard figuring out what to do based on that error message. But then again, I could have just followed the instructions for the plugin

        Show
        Kasper Thuno added a comment - I didn't configure it using ogr2ogr.xml nor did I have the ogr2ogr.exe in the path I believe... But still it's kinda hard figuring out what to do based on that error message. But then again, I could have just followed the instructions for the plugin
        Hide
        Andrea Aime added a comment -

        The actual cause is that not having ogr2ogr installed makes the OGR output format return an empty set of output formats, which is not handled properly

        Show
        Andrea Aime added a comment - The actual cause is that not having ogr2ogr installed makes the OGR output format return an empty set of output formats, which is not handled properly
        Hide
        Andrea Aime added a comment -

        Fixed on 2.0.x and trunk. Kasper, if you want to try out the fix grab a nightly build from http://gridlock.openplans.org/geoserver/2.0.x starting from tomorrow (today's nightly has been built already before the fix was committed)

        Show
        Andrea Aime added a comment - Fixed on 2.0.x and trunk. Kasper, if you want to try out the fix grab a nightly build from http://gridlock.openplans.org/geoserver/2.0.x starting from tomorrow (today's nightly has been built already before the fix was committed)
        Hide
        Andrea Aime added a comment -

        Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

          People

          • Assignee:
            Andrea Aime
            Reporter:
            Kasper Thuno
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: