Sunday, June 5, 2016

Running Java standlone app and spring xsd error message

When running java spring based standalone application, you might get an exception that spring is not able to validate the spring beans xsd file. This might due to the fact that your computer is behind a proxy and the java application does not have access to the proxy server. 

Assuming that you have a proxy server for internet configured with host as http.myproxy.net and port 9876 then run the java application with the below options will allow the application to launch

java -Dhttp.proxyHost=http.myproxy.net -Dhttp.proxyPort=9876 -Dhttp.proxyUser=someUserName -Dhttp.proxyPassword=somePassword -jar some-jar-to-run.jar

No comments: