Support Wikipedia

Wednesday, August 05, 2009

Glassfish : com.sun.enterprise.util.ASenvPropertyReader setSystemProperties SEVERE: property_reader.unknownHost java.net.UnknownHostException:

I was getting the following error after I installed Glassfish recently.

Aug 5, 2009 1:37:02 AM com.sun.enterprise.util.ASenvPropertyReader setSystemProperties
SEVERE: property_reader.unknownHost
java.net.UnknownHostException: test.corp: test.corp
at java.net.InetAddress.getLocalHost(InetAddress.java:1308)
at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:89)
at com.sun.enterprise.util.ASenvPropertyReader.setSystemProperties(ASenvPropertyReader.java:188)
at com.sun.enterprise.cli.commands.S1ASCommand.(S1ASCommand.java:140)
at com.sun.enterprise.cli.commands.BaseLifeCycleCommand.(BaseLifeCycleCommand.java:86)
at com.sun.enterprise.cli.commands.StartDomainCommand.(StartDomainCommand.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.enterprise.cli.framework.CommandFactory.createCommand(CommandFactory.java:76)
at com.sun.enterprise.cli.framework.CLIMain.invokeCommand(CLIMain.java:150)
at com.sun.enterprise.cli.framework.CLIMain.main(CLIMain.java:63)
Starting Domain domain1, please wait.
Log redirected to /home/testadmin/java/domains/domain1/logs/server.log.

Domain domain1 is ready to receive client requests. Additional services are being started in background.
java.net.UnknownHostException: test.corp: test.corp
CLI156 Could not start the domain domain1.



The Fix

sudo vim /etc/hosts
#add the following line in it. That's all
127.0.0.1 test.corp
Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia Support Wikipedia