{"id":481,"date":"2012-06-04T14:18:35","date_gmt":"2012-06-04T14:18:35","guid":{"rendered":"http:\/\/nangchang.nes.or.kr\/?p=481"},"modified":"2012-06-04T14:18:35","modified_gmt":"2012-06-04T14:18:35","slug":"error","status":"publish","type":"post","link":"https:\/\/nangchang.nes.or.kr\/?p=481","title":{"rendered":"Spring + Mybatis + tomcat \uc0ac\uc6a9 \uc911 &#8220;\uc2ec\uac01: Error listenerStar&#8221; \uc624\ub958"},"content":{"rendered":"<p>\uc544\uc544 \uc0bd\uc9c8\uc758 \uc5f0\uc18d \u3160.\u315c <\/p>\n<p>JDK 7, Spring 3.1, Mybatis, 3.1, tomcat 7, Ubuntu 12.04 \uc0ac\uc6a9 \uc911\uc774\ub2e4.<br \/>\ub85c\uceec\uc5d0\uc11c Eclipse+tomcat \uc73c\ub85c \uac1c\ubc1c \ud558\ub358 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc11c\ubc84\uc5d0 \ubc30\uce58\ud574\uc11c \ud14c\uc2a4\ud2b8 \ud558\ub824\uace0 \uc791\uc5c5\uc744 \ud588\ub2e4.<br \/>\uc11c\ubc84 \uc124\uce58\ub3c4 \ub2e4 \ub410\uace0, \uc11c\ubc84\uc5d0 war \ud30c\uc77c \uc62c\ub838\ub294\ub370, \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 \uc2dc\uc791\uc774 \uc548\ub41c\ub2e4=_=<br \/>tomcat \ub85c\uadf8\uc5d0 \ucc0d\ud788\ub294 \uc5d0\ub7ec \uba54\uc2dc\uc9c0\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \ub2ec\ub791 \ud55c\uc904;;<\/p>\n<blockquote><p>2012. 6. 4 \uc624\ud6c4 11:06:18 org.apache.catalina.startup.HostConfig deployWAR<br \/>\uc815\ubcf4: Deploying web application archive \/var\/lib\/tomcat7\/webapps\/app.war<br \/>2012. 6. 4 \uc624\ud6c4 11:06:20 org.apache.catalina.core.StandardContext startInternal<br \/><strong>\uc2ec\uac01: Error listenerStart<\/strong><br \/>2012. 6. 4 \uc624\ud6c4 11:06:20 org.apache.catalina.core.StandardContext startInternal<br \/>\uc2ec\uac01: Context [\/app] startup failed due to previous errors<br \/>2012. 6. 4 \uc624\ud6c4 11:06:20 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc<\/p><\/blockquote>\n<p>\ub3c4\uc800\ud788 \uc774\uc720\ub97c \uc54c \uc218 \uc5c6\ub294 \ub09c\uac10\ud55c \uc0c1\ud669\uc778\ub370.. \uad6c\uae00\uc2e0\uaed8 \ubb3c\uc5b4\ubcf4\ub2c8 spring \uc124\uc815\uc774 \uc798 \ubabb\ub41c \uacbd\uc6b0 \uc800 \uc5d0\ub7ec\uac00<br \/>\ub0a0 \uc218 \uc788\ub2e8\ub2e4. \ub85c\uceec\uc5d0\uc11c\ub294 \uc798\ub410\ub294\ub370 \uc124\uc815\uc774 \uc774\uc0c1\ud560\ub9ac\uac00.. \ub77c\uace0 \uc0dd\uac01\ud588\uc9c0\ub9cc&#8230; <br \/>\uacb0\uad6d \uc124\uc815\uc744 \ud558\ub098\uc529 \uc9c0\uc6cc\uac00\uba70 \ud14c\uc2a4\ud2b8 \ud588\ub294\ub370, mybatis \ucabd \uc124\uc815 \uc758\uc2ec\ub418\ub294 \uc0c1\ud669.<br \/>\uc815\ud655\ud55c \uc624\ub958\ub97c \uc54c \uc218 \uc5c6\uc5b4 \uc804\uc804\uae0d\uae0d\ud558\uba74\uc11c, \ub85c\uadf8\ub3c4 \uc81c\ub300\ub85c \uc548 \ucc0d\uc5b4 \uc8fc\ub294 tomcat\ub97c \uc6d0\ub9dd\ud558\ub2e4 \ubb38\ub4dd \uae68\ub2ec\uc558\ub2e4.<br \/>spring mvc template\uc73c\ub85c \ud504\ub85c\uc81d\ud2b8\ub97c \uc0dd\uc131\ud558\uba74 log4j \uc124\uc815\uc774 console \ub85c \ub85c\uadf8\ub97c \ucd9c\ub825\ud558\ub3c4\ub85d \ud55c\ub2e4\ub294\uac78=_=<br \/>\uadf8\ub798\uc11c \uc989\uc2dc \ud30c\uc77c\ub85c \ucd9c\ub825\ud558\ub3c4\ub85d \uc124\uc815\uc744 \uc218\uc815\ud588\ub2e4.<\/p>\n<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<\/p>\n<p>&lt;!DOCTYPE log4j:configuration PUBLIC &#8220;-\/\/APACHE\/\/DTD LOG4J 1.2\/\/EN&#8221; &#8220;log4j.dtd&#8221;&gt;<br \/>&lt;log4j:configuration xmlns:log4j=&#8221;http:\/\/jakarta.apache.org\/log4j\/&#8221;&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; Appenders &#8211;&gt;<br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &lt;appender name=&#8221;fileLog&#8221; class=&#8221;org.apache.log4j.DailyRollingFileAppender&#8221;&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name=&#8221;File&#8221; value=&#8221;\/var\/lib\/tomcat7\/webapps\/app\/log\/app.log&#8221; \/&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name=&#8221;Append&#8221; value=&#8221;true&#8221; \/&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;layout class=&#8221;org.apache.log4j.PatternLayout&#8221;&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name=&#8221;ConversionPattern&#8221; value=&#8221;%-5p: %c &#8211; %m%n&#8221; \/&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/layout&gt;<\/strong><br \/><strong>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/appender&gt;<\/strong><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; Application Loggers &#8211;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;logger name=&#8221;z.y.x&#8221;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;level value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/logger&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; 3rdparty Loggers &#8211;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;logger name=&#8221;org.springframework.core&#8221;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;level value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/logger&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;logger name=&#8221;org.springframework.beans&#8221;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;level value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/logger&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;logger name=&#8221;org.springframework.context&#8221;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;level value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/logger&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;logger name=&#8221;org.springframework.web&#8221;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;level value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/logger&gt;<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!&#8211; Root Logger &#8211;&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;root&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;priority value=&#8221;debug&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;appender-ref ref=&#8221;fileLog&#8221; \/&gt;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/root&gt;<\/p>\n<p>&lt;\/log4j:configuration&gt;<\/p><\/blockquote>\n<p>\uc5c9\uc5c9.. \ub85c\uadf8\uac00 \uc815\ub9d0 \uc798 \ucc0d\ud78c\ub2e4\u315c.\u315c<\/p>\n<blockquote><p>ERROR: org.springframework.web.context.ContextLoader &#8211; Context initialization failed<br \/>org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [z.y.x.service.UserServiceImpl] for bean with name &#8216;userServiceImpl&#8217; defined in file [\/var\/lib\/tomcat7\/webapps\/hadpan_web\/WEB-INF\/classes\/z\/y\/x\/service\/UserServiceImpl.class]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: z\/y\/x\/service\/UserServiceImpl : <strong>Unsupported major.minor version 51.0 <\/strong>(unable to load class z.y.x.service.UserServiceImpl)<br \/>&nbsp; &nbsp; &nbsp; &nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1265)<\/p><\/blockquote>\n<p>\uc74c.. \uc608\uc0c1\uacfc \ub2ec\ub9ac \uc9c1\uc811\uc801\uc73c\ub85c mybatis \uad00\ub828\ub41c\ucabd\uc740 \uc544\ub2cc\ub370&#8230; Unspported major.minor version \uc5b4\uca4c\uace0 \ud558\ub294 \uba54\uc2dc\uc9c0\uac00 \ubcf4\uc778\ub2e4.<br \/>\ub610 \uad6c\uae00\uc2e0\uaed8 \ubb3c\uc5b4 \ubd24\uc9c0. \uc790\ubc14 \ubc84\uc804 \ucc28\uc774\uc5d0 \uc758\ud574 \ubc1c\uc0dd\ud560 \uc218 \uc788\ub294 \uc5d0\ub7ec\ub780\ub2e4.<br \/>\uc544.. \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc790\ubc147\uc73c\ub85c \ube4c\ub4dc\ud588\ub294\ub370, tomcat7\uc740 JRE6 \uc5d0\uc11c \ub3cc\uc544\uac00\uace0 \uc788\uc5c8\ub358 \uac70\ub2e4.<\/p>\n<p>\uc0ac\uc6a9 \uc911\uc778 Ubuntu \uc11c\ubc84\uc758 tomcat7 \uc2e4\ud589 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \ubcf4\ub2c8 \ub2e4\uc74c\uacfc \uac19\uc740 \ubd80\ubd84\uc774 \uc788\ub2e4.<\/p>\n<p><\/p>\n<ul>\n<li>\/etc\/init.d\/tomcat7<\/li>\n<\/ul>\n<blockquote><p>JDK_DIRS=&#8221;<strong>\/usr\/lib\/jvm\/default-java<\/strong> ${OPENJDKS} \/usr\/lib\/jvm\/java-6-openjdk \/usr\/lib\/jvm\/java-6-sun&#8221;<\/p>\n<p># Look for the right JVM to use<br \/>for jdir in $JDK_DIRS; do<br \/>&nbsp; &nbsp; if [ -r &#8220;$jdir\/bin\/java&#8221; -a -z &#8220;${JAVA_HOME}&#8221; ]; then<br \/>&nbsp; &nbsp; &nbsp; &nbsp; JAVA_HOME=&#8221;$jdir&#8221;<br \/>&nbsp; &nbsp; fi<br \/>done<br \/>export JAVA_HOME<\/p><\/blockquote>\n<p>\/usr\/lib\/jvm\/default-java \ub77c\ub294 \ub514\ub809\ud1a0\ub9ac\uac00 \uc788\uc73c\uba74 \uc824 \uba3c\uc800 \uac70\uae30\ub97c JAVA_HOME\uc73c\ub85c \uc9c0\uc815\ud558\uac8c \ub418\uc5b4\uc788\ub2e4.<br \/>\ud574\ub2f9 \ud30c\uc77c\uc744 \ud655\uc778\ud574 \ubcf4\ub2c8 \uc5ed\uc2dc\ub098 \ubc84\uc804\uc774 6\uc774\ub2e4.<\/p>\n<blockquote><p>$ ls -l default-java<br \/>lrwxrwxrwx 1 root root 23 &nbsp;6\uc6d4 &nbsp;4 23:10 default-java -&gt; java-1.6.0-openjdk-i386<\/p><\/blockquote>\n<p>\ubc84\uc804 7\ub97c \uc0ac\uc6a9\ud558\ub3c4\ub85d \uc2ec\ubcfc\ub9ad \ub9c1\ud06c\ub97c \ubc14\uafd4\uc92c\ub2e4.<\/p>\n<blockquote><p>$ rm default-java<br \/>$ ln -s java-1.7.0-openjdk-i386 default-java<\/p><\/blockquote>\n<p>\uadf8\ub9ac\uace0 tomcat \uc7ac\uc2e4\ud589.<\/p>\n<blockquote><p>$ service tomcat7 restart <\/p><\/blockquote>\n<p>\uba40\uca61\ud558\uac8c \uc2e4\ud589\uc774 \ub418\ub294 \uad6c\ub098 \u315c.\u3160<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc544\uc544 \uc0bd\uc9c8\uc758 \uc5f0\uc18d \u3160.\u315c JDK 7, Spring 3.1, Mybatis, 3.1, tomcat 7, Ubuntu 12.04 \uc0ac\uc6a9 \uc911\uc774\ub2e4.\ub85c\uceec\uc5d0\uc11c Eclipse+tomcat \uc73c\ub85c \uac1c\ubc1c \ud558\ub358 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc11c\ubc84\uc5d0 \ubc30\uce58\ud574\uc11c \ud14c\uc2a4\ud2b8 \ud558\ub824\uace0 \uc791\uc5c5\uc744 \ud588\ub2e4.\uc11c\ubc84 \uc124\uce58\ub3c4 \ub2e4 \ub410\uace0, \uc11c\ubc84\uc5d0 war \ud30c\uc77c \uc62c\ub838\ub294\ub370, \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 \uc2dc\uc791\uc774 \uc548\ub41c\ub2e4=_=tomcat \ub85c\uadf8\uc5d0 \ucc0d\ud788\ub294 \uc5d0\ub7ec \uba54\uc2dc\uc9c0\ub294 \ub2e4\uc74c\uacfc \uac19\uc774 \ub2ec\ub791 \ud55c\uc904;; 2012. 6. 4 \uc624\ud6c4 11:06:18 org.apache.catalina.startup.HostConfig deployWAR\uc815\ubcf4: Deploying web application [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[32,36,37],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-pogramming","tag-mybatis","tag-spring","tag-tomcat"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=481"}],"version-history":[{"count":0,"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nangchang.nes.or.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}