严重: Unable to set localhost. This prevents creation of a GUID. Cause was: cloud: cloud

严重: Unable to set localhost. This prevents creation of a GUID. Cause was: cloud: cloud
java.net.UnknownHostException: cloud: cloud
    at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
    at net.sf.ehcache.Cache.(Cache.java:200)
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:302)
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:218)
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:600)
    at net.sf.ehcache.CacheManager.init(CacheManager.java:359)
    at net.sf.ehcache.CacheManager.(CacheManager.java:300)
    at net.sf.ehcache.CacheManager.create(CacheManager.java:698)
    at org.mybatis.caches.ehcache.EhcacheCache.(EhcacheCache.java:39)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:161)
    at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:72)
    at org.apache.ibatis.io.Resources.classForName(Resources.java:235)
    at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:81)
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.cacheElement(XMLMapperBuilder.java:97)
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:77)
    at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:62)
    at cn.freeteam.util.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:267)
    at cn.freeteam.util.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:92)
    at cn.freeteam.util.XMLConfigBuilder.parse(XMLConfigBuilder.java:78)
    at cn.freeteam.util.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:47)
    at cn.freeteam.util.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:29)
    at cn.freeteam.util.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:17)
    at cn.freeteam.util.MybatisSessionFactory.(MybatisSessionFactory.java:38)
    at cn.freeteam.base.BaseService.initMapperObj(BaseService.java:53)
    at cn.freeteam.base.BaseService.initMapper(BaseService.java:29)
    at cn.freeteam.cms.service.HtmlquartzService.(HtmlquartzService.java:41)
    at cn.freeteam.cms.util.QuartzInitializer.init(QuartzInitializer.java:53)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2013-9-6 14:44:53 net.sf.ehcache.util.UpdateChecker doCheck

信息: New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4]. Please check http://ehcache.org for the latest version.



问题是因为DNS无法解析此域名所导致的,做如下修改解决:

#vi /etc/hosts

添加

127.0.0.1   cloud

问题解决



你可能感兴趣的:(java,web开发)