2011-12-19 7 views
15

Ho creato un'applicazione di riproduzione. Quando sto facendo funzionare l'applicazione sto ottenendo questo errore sia in dev e prodPlay Framework GUID

07:59:58,445 INFO ~ Precompiling ... 
08:00:08,884 ERROR ~ Unable to set localhost. This prevents creation of a GUID. Cause was: sys3: sys3: Name or service not known 
java.net.UnknownHostException: sys3: sys3: Name or service not known 
    at java.net.InetAddress.getLocalHost(InetAddress.java:1438) 
    at net.sf.ehcache.Cache.<clinit>(Cache.java:155) 
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:298) 
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:214) 
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:552) 
    at net.sf.ehcache.CacheManager.init(CacheManager.java:323) 
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:279) 
    at net.sf.ehcache.CacheManager.create(CacheManager.java:641) 
    at play.cache.EhCacheImpl.<init>(EhCacheImpl.java:31) 
    at play.cache.EhCacheImpl.newInstance(EhCacheImpl.java:41) 
    at play.cache.Cache.init(Cache.java:241) 
    at play.Play.start(Play.java:511) 
    at play.Play.init(Play.java:300) 
    at play.server.Server.main(Server.java:158) 
Caused by: java.net.UnknownHostException: sys3: Name or service not known 
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) 
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866) 
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258) 
    at java.net.InetAddress.getLocalHost(InetAddress.java:1434) 
    ... 13 more 

Non so che cosa è questo, ciò che questo farà. Come risolvere questo problema. Pl help me.

risposta

27

Java è in grado di risolvere mynap3 come localhost, quindi si dovrà aggiungere la riga

127.0.0.1 localhost mynap3 

al file/etc/hosts

si può fare questo eseguendo

sudo bash 
echo "127.0.0.1 localhost mynap3" >> /etc/hosts