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 파일 내에서 찾을 수 없습니다.
3. ADL applicaiton script 수정 1. application 변수 추가 this.av_topFrame;
2. this.application_onloadingglobalvariables 에 한줄 추가 this.av_topFrame = this.av_mainFrame.vStartFrameSet.vMainFrameSet.topFrame;
4. topFrame.xfdl 수정 1. 버튼 하나 추가, Event하나 추가 . id : btn_control . Event : fn_control . Text : 숨기기 . position : 맨 오른쪽 하단
2. script
this.fn_control = function(obj:Button, e:nexacro.ClickEventInfo) { var sText = this.btn_control.text;
if (sText == "숨기기"){ //(topFrame, 업무FrameSet, bottomFrame) //topFrame(11)을 한 이유는 '보여주기'버튼이 보이도록 하기 위함. //현재 개발은 일반button이지만 실 프로젝트에서는 'image'를 이용해서 숨기기/보여주기를 해야 됨 application.av_allFrame.set_separatesize("11,*,50"); this.btn_control.set_top(0); this.btn_control.set_text("보여주기"); }else{ application.av_allFrame.set_separatesize("50,*,50"); this.btn_control.set_top(28); this.btn_control.set_text("숨기기"); } }
1. 정의 1. frame단에서 업무화면의 함수를 호출 하는 경우가 존재 한다. 좋은 예로, tabpage에서 [x]를 눌러 화면을 닫을 수 있는데 만약, 화면에서 변경된 자료가 존재 할 경우는 닫지 않는 경우가 발생한다. 이때 tabpage를 먼저 delete하고 화면을 받으려 하다고 자료 변경건으로 화면을 닫지 못할 경우에 tabpage는 삭제 되고, 화면이 닫혀진 문제가 발생한다.
2. 이런경우 개발방법은 화면에 존재하는 함수를 호출하여 화면을 닫을 수 있는지 검사하고 닫을 수 있는 경우에만 tabpage도 삭제 한다.
3. ADL application script 1. function 1개 생성 2. script this.afn_callFormFunction = function(sFuncNm, sArg){ this.av_mdiFrameSet[application.gv_activeMenuId].form.fn_callFormFunction(sFuncNm, sArg); }
4. workMain.xfdl 화면 1. function 1개 생성 2. 화면 호출함수가 2. script //application(frame)에서 업무화면의 함수를 호출하고 싶을 경우에 사용되는 function this.fn_callFormFunction = function(sFuncNm, sArg){ return eval("this.div_work." + sFuncNm).call(this.div_work, sArg); }
5. commonCode.xfdl 화면 1. edit box 1개, function 1개 추가 2. Edit box . id : edt_out Funciton : fn_setOutEditBox() 3. script this.fn_setOutEditBox = function(args){ this.edt_out.set_value(args); return true; }
1. tabFrame.xfdl 화면 1. 정의 : 화면을 open시 gds_menu.param 컬럼에 존재 하는 값을 업무화면에서 받아 사용하기 2. 기존 fn_menuOpen() 함수 변경 (이미 존재) . 추가 script newChild.biz_param = sParam; . 추가 위치 newChild.biz_menuId = sMenuId; -> script의 다음줄 2. workMain.xfdl 화면 1. 기존 fn_onload()함수 변경 (이미 존재) . 추가 script this.fv_param = this.getOwnerFrame().biz_param; . 추가 위치 this.fv_menuId = this.getOwnerFrame().biz_menuId; -> script의 다음줄 2. 2개 함수 생성 . fn_getParam() : 업무화면에서 호출되어 param 값을 넘겨줄 function . fn_getMenuId() : 업무화면에서 호출되어 menuId값을 넘겨줄 function 3. script
//업무화면에서 parameter값을 얻고 싶을 경우 호출되는 function this.fn_getParam = function(){ return this.fv_param; } //업무화면에서 menuid를 얻고 싶을 경우 호출되는 function this.fn_getMenuId = function(){ return this.fv_menuId; }
3. commonCode.xfdl 화면 1. 정의 : 업무화면에서 menu에서 넘겨준 param값을 확인하기 2. Event 1개 생성 . fn_onload 3. script