GIS View Error in NAT environment

Document ID : KB000005374
Last Modified Date : 21/12/2018
Show Technical Document Details

Launching  GIS view in NATted environment  you may get the following error:

“This page didn't load Google Maps correctly. See the JavaScript console for technical details” 

And in the console log you may see the following error:


Dec 21, 2016 12:50:19.113 - http://180.XXX.XXX.XXX:8080/spectrum/console/gisGC.config 
Dec 21, 2016 12:51:22.114 - class org.apache.jsp.console.gis_002dview_jspFile::gisGC.config is missing. 


Customer is accessing to the OC Web page using an external IP address (eg. // In a NAT environment the ip address will be translated to the internal IP address eg. 

Now, when you click on GIS View the following piece of code of gis-view.jsp (from $SPECROOT\tomcat\webapps\spectrum\console) is executed:

String requestRestURL ; 
String requestURL = request.getRequestURL().toString(); 
String servletPath = request.getServletPath(); 
String appPath = requestURL.substring(0, requestURL.indexOf(servletPath)); 
InputStream inputStream = null; 
Properties prop = null; 
String ipAdressesFile=appPath+"/console/gisGC.config"; 
URL url = new URL(ipAdressesFile);


In such environment the appPath will contain // and this will cause the above mentioned error because the gisGC.config should be researched and opened on the local machine that has ip address and not


Modify the line 309 of $SPECROOT\tomcat\webapps\spectrum\console\gis-view.jsp


String appPath = requestURL.substring(0, requestURL.indexOf(servletPath)); 


String appPath = "http://localhost:8080/spectrum";


being sure to specify the correct OC Tomcat port. In the customer case it was 8080.