Tag Archives: geoserver

GeoServer source code offline environment debugging startup error [How to Solve]

Question:
The geoserver source code has been compiled successfully, but the debugging fails to start normally in the IDEA environment, reporting the following error:

Failed startup of context o.e.j.w.WebAppContext@74a6a609{/geoserver, file:///D:/work/geoserver/src/web/app/src/main/webapp/, UNAVAILABLE}{src/main/webapp}
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.sochetConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

Solution:
The above error is caused by the start of debugging will be network access (java.sun.com/23.33.94.164:80), modify the gs-web-app project under the src/main/webapp/WEB-INF/web.xml, the DOCTYPE tag can be commented up, modified as follows.

<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD WebApplication 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">-->
<web-app>
    <display-name>GeoServer></display-name>

    <context-param>
        <param-name>serviceStrategy</param-name>
    ......