My case is weird. I am using docker image to start fineract server, which runs tomcat and springboot application. We found that the server only works on PC with wifi connection. So I created a debian 9 virtual machine to reproduce this error. On the VM, network is modeled as wire connection. And I can reproduce the error. I used the same docker image on my host machine which has a wifi connection, it works just fine.
I downloaded catalina.out log files from host and the VM. I see these errors from the docker image running on the VM.
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring-security.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306)
and these later in the log:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
10:41:31.984 [localhost-startStop-1] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 35 in XML document from URL [file:/bitnami/tomcat/data/fineract-provider/WEB-INF/classes/META-INF/spring/appContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 36; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'sec:global-method-security'.
I started a bash in the problematic docker container, and from there I can download the xsd file from http://www.springframework.org/schema/security/spring-security.xsd without any problem. Therefore, it shouldn't be network problem.
I am relatively new to Springboot framework. Any debug suggestions are welcome. I also have another question that is it so Springboot Application always download something online when it starts? This may not be an good idea if my application is running inside a restricted local network, isn't it?