차근차근/Spring

server tomcat v7.0 server at localhost failed to start. 2

예쁜꽃이피었으면 2015. 6. 1. 09:49

http://action713.tistory.com/1035 여기서 이어진다.


web.xml을 수정해야 할 것 같은데 도통 모르겠다..


web.xml 설정 및 구문 순서

http://jwchoi85.tistory.com/58


web.xml의 이해(개요, 기능 활용)

http://wiki.gurubee.net/pages/viewpage.action?pageId=26740333


spring에 있는 web.xml파일의 대략적인 설명과 함께 설정해보자.

http://souog321.tistory.com/entry/5-Spring%EC%97%90-%EC%9E%88%EB%8A%94-xml-%ED%8C%8C%EC%9D%BC%EB%93%A4%EC%9D%84-%EC%84%A4%EC%A0%95%ED%95%B4%EB%B3%B4%EC%9E%901


여전히 에러. 이젠 에러 메시지를 봐야 겠다.


Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] at org.apache.catalina.util.LifecycleBase.start


답변 1]

Your webapp has servletcontainer specific libraries like servlet-api.jar file in its /WEB-INF/lib. This is not right. Remove them all. The /WEB-INF/lib should contain only the libraries specific to the webapp, not to the servletcontainer. The servletcontainer (like Tomcat) is the one who should already provide the servletcontainer specific libraries. If you supply libraries from an arbitrary servletcontainer of a different make/version, you'll run into this kind of problems because your webapp wouldn't be able to run on a servletcontainer of a different make/version than where those libraries are originated from.

This is a pretty common starters mistake when they encounter compiletime errors because they haven't setup their IDE project right. See also How do I import the javax.servlet API in my Eclipse project?

우선 임의로 추가했던 jar파일들 삭제했다. 전에는 없으면 에러가 났는데 에러가 나지 않았다.(빨간 밑줄이나 이런거..)




여기저기 글을 읽다보니 버전의 문제인게 맞는 것 같다.

어떤게 어떻게 섞여있는지 나도 이제 헷갈려서,, 새로 설치를 해야하는 것인지 고민이 된다.





에러 메시지 중에

Setting property 'source' to 'org.eclipse.jst.jee.server 하는 부분이 있어서 

여기나온대로 따라해봤다.

정상적으로 실행되던 톰켓에서 아래와 같은 오류를 뱉어 낼 경우가 간혼 있다.

Setting property 'source' to 'org.eclipse.jst.jee.server:프로젝트명' did not find a matching property.

그럴 경우 톰캣 설정에 Server Option 탭에 아래와 같은 설정 후 재기동.

 


 



그랬더니 이제는

에러 내용이 바뀐 것 같다.

경고: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:onjboard111' did not find a matching property.

6월 01, 2015 1:24:57 오후 org.apache.catalina.core.ContainerBase addChildInternal

심각: ContainerBase.addChild: start: 

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/maven.project]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalArgumentException: The servlets named [preView] and [com.board.ajaxpreview.ContentPreView] are both mapped to the url-pattern [/preView] which is not permitted

at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)

at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2428)

at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2103)

at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2064)

at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)

at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)

at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)

at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1304)

at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5412)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

... 10 more


6월 01, 2015 1:24:57 오후 org.apache.catalina.startup.HostConfig deployDescriptor

심각: Error deploying configuration descriptor C:\11111\study_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\maven.project.xml

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/maven.project]]

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)



http://stackoverflow.com/questions/17656398/tomcat-7-slow-start-metadata-complete-true-web-xml

여기를 보고 web.xml에 

<web-app 어쩌고저쩌고> 이 부분에

 metadata-complete="true"

이걸 추가했다. 

다시 새로운 에러가 나왔다.


정보: Initializing Spring root WebApplicationContext

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

6월 01, 2015 1:35:07 오후 org.apache.catalina.core.StandardContext listenerStart

심각: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardDAO' defined in ServletContext resource [/WEB-INF/boardConfig.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/core/RowMapper

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1007)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: org/springframework/jdbc/core/RowMapper

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

at java.lang.Class.getConstructor0(Unknown Source)

at java.lang.Class.getDeclaredConstructor(Unknown Source)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)

... 26 more

Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.core.RowMapper

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)

... 32 more


6월 01, 2015 1:35:07 오후 org.apache.catalina.core.StandardContext startInternal

심각: Error listenerStart




 

http://action713.tistory.com/1039  여기로 이어짐   별 내용은 없음..

반응형