1. 정의 : Controller.java 파일에 [@RequestMapping(value = "/selectSampleList.do")] 이 문장을 was가 start할때 scan해서 Container에 적제하도록 하는 설정
- 설정하지 않으면 발생하는 오류1 : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sampleController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sampleService' available
- 발생시점1 : tomcat start시.
- 설정하지 않으면 발생하는 오류2 :WARN [org.springframework.web.servlet.PageNotFound]No mappingfor GET /selectSampleList.do
- 발생시점2 : 화면단에서 request 요청할 때
- 설정파일 : context-common.xml
- 설정내용 :
3. Query 관련 환경 설정
1. 정의 : Query Mapper파일(xml) 경로 및 Mapper Class scan을 위한 패키지 경로 지정
- 설정하지 않으면 발생 오류 : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sampleService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sampleMapper' available
: 아래처럼 maven설정했을 경우 nexaN용 uiadapter가 정상적으로 작동되지 않는다.
: 그래서, maven설정으로 하지말고 jar를 직접 down받은 후 /WEB-INF/lib 밑으로 붙여넣어서 사용해야 된다.
. 아래 maven 설정하면 오류발생
- 그래서, maven설정으로 하지말고 jar를 직접 down받은 후 /WEB-INF/lib 밑으로 붙여넣어서 사용해야 된다.
nexaN용 jar down url : http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459">http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nexacroFileView': Unsatisfied dependency expressed through field 'useRequestCharset'; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'EtcProperty' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?
오류2: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'nexacroView': Unsatisfied dependency expressed through field 'useRequestCharset'; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'EtcProperty' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid? 해결방법1 : 모름
해결방법2 : http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459">http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459 위 url에서 jar를 down받은후 /WEB-INF/lib 밑으로 붙여 넣는다. (nexa pom 설정이 정상적이지 않아서 필요한 jar들이 download되지 않아서 발생)
- D:\eGov\maven\ 밑으로 붙여 넣는다. 기존 repository는 backup을 한 후 압축파일을 해제 한다.
9. 프로젝트 실행
99. 오류 목록 및 해결방법
1. 해결방법 : ?
오류내용 :
Cannot invoke "org.apache.maven.index.context.IndexingContext.purge()" because "context" is null
2. 사유 : 컴파일에 사용된 Servlet API 버전과 배포 시에 사용된 tomcat의 Servlet API 버전이 차이때문에 발생. 해결방법 : tomcat 버전에 맞는 Servlet API 버전을 프로젝트 상에서 지정하시면 됨 Servlet API버전에 맞는 tomcat 버전을 설치
(jdk-16.1.0, tomcat 10 : 오류)
(jdk-16.1.0, tomcat 9 : 정상)
오류내용 : java.lang.ClassCastException: class org.egovframe.rte.ptl.mvc.filter.HTMLTagFilter cannot be cast to class jakarta.servlet.Filter (org.egovframe.rte.ptl.mvc.filter.HTMLTagFilter is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @ebaa6cb; jakarta.servlet.Filter is in unnamed module of loader java.net.URLClassLoader @3d494fbf)
사유 : 컴파일에 사용된 Servlet API 버전과 배포 시에 사용된 tomcat의 Servlet API 버전이 차이때문에 발생. 해결방법 : tomcat 버전에 맞는 Servlet API 버전을 프로젝트 상에서 지정하시면 됨 Servlet API버전에 맞는 tomcat 버전을 설치
3. 해결방법 : jstl-1.2.jar(maven에 존재)를 /web-inf/lib 밑으로 붙여 넣는다. 오류내용 : org.apache.jasper.JasperException: 절대 URI인 [http://java.sun.com/jsp/jstl/core]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다.
4. 해결방법 : spring-webmvc-5.3.6.jar(maven에 존재)를 /web-inf/lib 밑으로 붙여 넣는다. 오류내용1 : org.apache.jasper.JasperException: 절대 URI인 [http://www.springframework.org/tags]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다.
오류내용2: org.apache.jasper.JasperException: 절대 URI인 [http://www.springframework.org/tags/form]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다..
5. 해결방법 : org.egovframe.rte.ptl.mvc-4.0.0.jar(maven에 존재)를 /web-inf/lib 밑으로 붙여 넣는다. 오류내용 : org.apache.jasper.JasperException: 절대 URI인 [http://egovframework.gov/ctl/ui]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다.
6. 해결방법 : spring-modules-validation-0.9.jar(maven에 존재)를 /web-inf/lib 밑으로 붙여 넣는다.
오류내용 : org.apache.jasper.JasperException: 절대 URI인 [http://www.springmodules.org/tags/commons-validator]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다.