Our lab uses several ruggedized military laptops in a closed-network business environment. These computers are running identical Windows 7 versions, networked with static IP's, running Apache Tomcat and Java.
This issue only occurs if the device’s name or IP address is in the local hosts file and when the device is powered up it is not connected to the network. When those combination of factors occur, several web applications fail consistently, resulting in HTTP 500 errors, as follows:
Could not call log service due to: java.net.UnknownHostException: examplePc1: examplePc1 at java.net.InetAddress.getLocalHost(Unknown Source) at ...myservices.wrappers.logservice.LogServiceWrapper.log(Unknown Source) at org.apache.jsp.checkConnection_jsp._jspService(checkConnection_jsp.java:150) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) etc...
Here are the version details:
- Microsoft Windows 7 Professional (6.1.7601), Service Pack 1, Build 7601
- Java 7 (1.7.0_45)
- Apache Tomcat (7.0)
The issue is resolved when the device's IP address is commented-out or removed from the Hosts file. However having a many more devices at the enterprise level means that tailoring the hosts file for each laptop is not practical.
Is this an issue with Windows 7? If so, where this bug is documented?
I have posted the conjugate question with an emphasis on the suspect code on Stack Overflow, here.