Error creating bean with name grailsApplication defined in ServletContext resource [WEB-INF appl...
Error creating bean with name grailsApplication defined in ServletContext resource [WEB-INF appl...
현상
현상
2021-03-02 10:33:51,025 [localhost-startStop-1] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.forName(Class.java:278)
... 5 more
Caused by: java.net.UnknownHostException: ht-qa: ht-qa: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1475)
at com.happycode.log.Logger.<clinit>(Logger.groovy:24)
... 6 more
Caused by: java.net.UnknownHostException: ht-qa: Name or service not known
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
at java.net.InetAddress.getLocalHost(InetAddress.java:1471)
... 7 more
원인- 호스트 인식 안됨
해결
sudo vi /etc/hosts
127.0.0.1 {host name}