Uploaded image for project: 'GeoServer'
  1. GeoServer
  2. GEOS-7724

Imagemap extension preventing Geoserver startup

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.9.1
    • Fix Version/s: 2.9.2
    • Component/s: Imagemap
    • Labels:
      None
    • Environment:

      Centos 7 x64, Oracle JDK 1.8u101 x64, Tomcat 7, Geoserver 2.9.1 (war)

      Description

      When using imagemap extension, Geoserver fails to start with errors in log:

      Sep  7 10:52:51 hs-geo server: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from URL [jar:file:/var/lib/tomcat/webapps/geoserver/WEB-INF/lib/gs-imagemap-2.9.1.jar!/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog.
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
      Sep  7 10:52:51 hs-geo server: at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
      Sep  7 10:52:51 hs-geo server: at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
      Sep  7 10:52:51 hs-geo server: at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
      Sep  7 10:52:51 hs-geo server: at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:609)
      Sep  7 10:52:51 hs-geo server: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:510)
      Sep  7 10:52:51 hs-geo server: at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
      Sep  7 10:52:51 hs-geo server: at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
      Sep  7 10:52:51 hs-geo server: at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      Sep  7 10:52:51 hs-geo server: at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
      Sep  7 10:52:51 hs-geo server: at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
      Sep  7 10:52:51 hs-geo server: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      Sep  7 10:52:51 hs-geo server: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      Sep  7 10:52:51 hs-geo server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      Sep  7 10:52:51 hs-geo server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      Sep  7 10:52:51 hs-geo server: at java.lang.Thread.run(Thread.java:745)
      Sep  7 10:52:51 hs-geo server: Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog.
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1465)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
      Sep  7 10:52:51 hs-geo server: at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
      Sep  7 10:52:51 hs-geo server: at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
      Sep  7 10:52:51 hs-geo server: ... 27 more
      Sep  7 10:52:51 hs-geo server: Sep 07, 2016 10:52:51 AM org.apache.catalina.core.StandardContext startInternal
      Sep  7 10:52:51 hs-geo server: SEVERE: Error listenerStart
      

      This is what gs-imagemap-2.9.1.jar!/applicationContext.xml looks like:

      <?xml version="1.0" encoding="UTF-8"?>
      -<!-- 
       - Copyright (C) 2014 - 2016 - Open Source Geospatial Foundation. All rights reserved.
       - This code is licensed under the GPL 2.0 license, available at the root
       - application directory.
       - -->
      

      Link to github

      I tried to change the second line to:

      <!-- 
      

      And with that change startup errors are fixed

        Attachments

          Activity

            People

            • Assignee:
              ianturton Ian Turton
              Reporter:
              dracic Davor Racic
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: