반응형
● 코딩학원 공부내용 정리
1. 수업 시간에 진도나가는 것을 팀프로젝트 게시판 만들기와 연동해보자.
2. 게시판 완성되면 서비스를 추가한다.
3. 어제했던 spring 파일을 열었는데 오류가 잔득 나있다. 뭐지?
4. 뒤로가기 했을 때 이전 창이 유지되어야 한다. 처음으로 돌아가면 짜증남. SearchItem 내부에 메서드 필요하다.
// ?page=10&pageSize=10&option=A&keyword=title
public String getQueryString(Integer page2) {
return UriComponentsBuilder.newInstance()
.queryParam("page", page)
.queryParam("pageSize", pageSize)
.queryParam("option", option)
.queryParam("keyword", keyword)
.build().toString();
}
5. 게시판 네비게이션 숫자 정하는거 생각보다 복잡하네?
6. DAO와 DTO....??!??!?!?!?!?!?
7. 뭐가 잘못됐는지 홈페이지 창이 아예 뜨지 않는다. 뭐가 오류지?
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 서버 버전 이름: Apache Tomcat/9.0.73
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Server 빌드 시각: Feb 27 2023 15:33:40 UTC
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: Server 버전 번호: 9.0.73.0
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 운영체제 이름: Windows 10
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 운영체제 버전: 10.0
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 아키텍처: amd64
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 자바 홈: C:\Program Files\java\jdk-11.0.17+8
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: JVM 버전: 11.0.17+8
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: JVM 벤더: Eclipse Adoptium
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: CATALINA_BASE: C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: CATALINA_HOME: C:\apache-tomcat-9.0.73
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: -Dcatalina.base=C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: -Dcatalina.home=C:\apache-tomcat-9.0.73
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: -Dwtp.deploy=C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: --add-opens=java.base/java.lang=ALL-UNNAMED
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: --add-opens=java.base/java.io=ALL-UNNAMED
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: --add-opens=java.base/java.util=ALL-UNNAMED
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.VersionLoggerListener log
정보: 명령 행 아규먼트: -Dfile.encoding=UTF-8
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
정보: APR 버전 [1.7.2]을(를) 사용한, APR 기반 Apache Tomcat Native 라이브러리 [1.2.36]을(를) 로드했습니다.
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
정보: APR 용량정보들: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
정보: APR/OpenSSL 설정: useAprConnector [false], useOpenSSL [true]
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.AprLifecycleListener initializeSSL
정보: OpenSSL이 성공적으로 초기화되었습니다: [OpenSSL 1.1.1t 7 Feb 2023]
5월 02, 2023 2:04:31 오후 org.apache.coyote.AbstractProtocol init
정보: 프로토콜 핸들러 ["http-nio-80"]을(를) 초기화합니다.
5월 02, 2023 2:04:31 오후 org.apache.catalina.startup.Catalina load
정보: [539] 밀리초 내에 서버가 초기화되었습니다.
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.StandardService startInternal
정보: 서비스 [Catalina]을(를) 시작합니다.
5월 02, 2023 2:04:31 오후 org.apache.catalina.core.StandardEngine startInternal
정보: 서버 엔진을 시작합니다: [Apache Tomcat/9.0.73]
5월 02, 2023 2:04:33 오후 org.apache.jasper.servlet.TldScanner scanJars
정보: 적어도 하나의 JAR가 TLD들을 찾기 위해 스캔되었으나 아무 것도 찾지 못했습니다. 스캔했으나 TLD가 없는 JAR들의 전체 목록을 보시려면, 로그 레벨을 디버그 레벨로 설정하십시오. 스캔 과정에서 불필요한 JAR들을 건너뛰면, 시스템 시작 시간과 JSP 컴파일 시간을 단축시킬 수 있습니다.
5월 02, 2023 2:04:33 오후 org.apache.catalina.core.ApplicationContext log
정보: No Spring WebApplicationInitializer types detected on classpath
5월 02, 2023 2:04:33 오후 org.apache.catalina.core.ApplicationContext log
정보: Initializing Spring root WebApplicationContext
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
WARN : org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardDaoImpl': Unsatisfied dependency expressed through field 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSession' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardDaoImpl': Unsatisfied dependency expressed through field 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSession' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4493)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:917)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSession' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:706)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1361)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 46 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
... 61 more
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:613)
at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:491)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1858)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795)
... 68 more
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:128)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:100)
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:611)
... 71 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:1071)
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:1024)
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:822)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:223)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:120)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:144)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:136)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:126)
... 73 more
5월 02, 2023 2:04:34 오후 org.apache.catalina.core.StandardContext listenerStart
심각: Context initialized 이벤트를 [org.springframework.web.context.ContextLoaderListener] 클래스의 인스턴스인 리스너에 전송하는 동안 예외 발생
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardDaoImpl': Unsatisfied dependency expressed through field 'session'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSession' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4493)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4939)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:917)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSession' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Cannot resolve reference to bean 'sqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:706)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1361)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657)
... 46 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1799)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
... 61 more
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:613)
at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:491)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1858)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1795)
... 68 more
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]'. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:128)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:100)
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:611)
... 71 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.earth.heart.dao.BoardMapper.selectAll. please check file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml] and file [C:\workspace-spring\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyBatisWeb\WEB-INF\classes\mapper\boardMapper.xml]
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:1071)
at org.apache.ibatis.session.Configuration$StrictMap.put(Configuration.java:1024)
at org.apache.ibatis.session.Configuration.addMappedStatement(Configuration.java:822)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:223)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:120)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:144)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:136)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:126)
... 73 more
5월 02, 2023 2:04:34 오후 org.apache.catalina.core.StandardContext startInternal
심각: 하나 이상의 리스너들이 시작하지 못했습니다. 상세 내역은 적절한 컨테이너 로그 파일에서 찾을 수 있습니다.
5월 02, 2023 2:04:34 오후 org.apache.catalina.core.StandardContext startInternal
심각: 이전 오류들로 인해 컨텍스트 [/heart]의 시작이 실패했습니다.
5월 02, 2023 2:04:34 오후 org.apache.catalina.core.ApplicationContext log
정보: Closing Spring root WebApplicationContext
5월 02, 2023 2:04:34 오후 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
경고: 웹 애플리케이션 [heart]이(가) JDBC 드라이버 [org.postgresql.Driver]을(를) 등록했지만, 웹 애플리케이션이 중지될 때, 해당 JDBC 드라이버의 등록을 제거하지 못했습니다. 메모리 누수를 방지하기 위하여, 등록을 강제로 제거했습니다.
5월 02, 2023 2:04:35 오후 org.apache.jasper.servlet.TldScanner scanJars
정보: 적어도 하나의 JAR가 TLD들을 찾기 위해 스캔되었으나 아무 것도 찾지 못했습니다. 스캔했으나 TLD가 없는 JAR들의 전체 목록을 보시려면, 로그 레벨을 디버그 레벨로 설정하십시오. 스캔 과정에서 불필요한 JAR들을 건너뛰면, 시스템 시작 시간과 JSP 컴파일 시간을 단축시킬 수 있습니다.
5월 02, 2023 2:04:35 오후 org.apache.catalina.core.ApplicationContext log
정보: No Spring WebApplicationInitializer types detected on classpath
5월 02, 2023 2:04:35 오후 org.apache.catalina.core.ApplicationContext log
정보: Initializing Spring root WebApplicationContext
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext initialized in 252 ms
5월 02, 2023 2:04:36 오후 org.apache.catalina.core.ApplicationContext log
정보: Initializing Spring DispatcherServlet 'appServlet'
INFO : org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'appServlet'
INFO : org.springframework.web.servlet.DispatcherServlet - Completed initialization in 804 ms
5월 02, 2023 2:04:36 오후 org.apache.coyote.AbstractProtocol start
정보: 프로토콜 핸들러 ["http-nio-80"]을(를) 시작합니다.
5월 02, 2023 2:04:36 오후 org.apache.catalina.startup.Catalina start
정보: 서버가 [5387] 밀리초 내에 시작되었습니다.
8. 오류가 한 두개가 아님. 오늘 집중력이 떨어진 것 같고 이해력도 떨어지는 것 같다.
9. 이젠 spring 파일 불러오기도 되지 않는다. 오늘은 다 안 되네
10. 결국 정현이에게 도움을 요청했다. 파일을 복사 붙여넣기했다. 이전 파일은 복사해서 보관 중이다. 뭐가 다른 점일까? 왜 나는 못따라갔지? 무엇을 틀리게 적었을까?
반응형
'코딩 학원(국비지원)' 카테고리의 다른 글
74일차 코딩학원 (0) | 2023.05.04 |
---|---|
73일차 코딩학원 (3) | 2023.05.03 |
71일차 코딩학원 (1) | 2023.05.01 |
70일차 코딩학원. 오류하나 덕분에 하루종일 고민함 (0) | 2023.04.28 |
69일차 코딩학원 (0) | 2023.04.27 |