[ eGov 환경설정 ]

0. 정의

    - eGov4.0 환경에 nexaN용 uiadapter 설치하기

 

1. nexacroN 관련 환경설정

    1. uiadapterN 환경설정

         . https://www.playnexacro.com/#show:learn:4732

     2. NexacroException 사용하기

         . https://www.playnexacro.com/#show:learn:4787

     3. Excel (xeni) 환경설정

         . https://www.playnexacro.com/#show:learn:4732 , https://www.playnexacro.com/#show:learn:4810

     4. File upload/download 환경설정

         . https://www.playnexacro.com/#show:learn:4868

 

2. Controller 관련 환경 설정

     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 mapping for 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

         - 발생시점 : tomcat start시

         - 설정파일 : context-mapper.xml

         - 설정내용 :

 

 

4. transaction commit/rollback 관련 환경 설정

     1. 정의 : Dataset Rollback관련 정보 수정

         - 설정하지 않으면 발생 오류 : 

         - 발생시점 : 

         - 설정파일 : context-transaction.xml

         - 설정내용 :

 

 

'Nexacro-Framework > eGov & nexa' 카테고리의 다른 글

3. eGov + nexa 연동  (0) 2022.07.02
3. eGov4.0 + uiadapterN  (0) 2022.07.01
2. uiadapter  (0) 2022.07.01
1. eGov4.0.0 설치 및 샘플 프로젝트 만들기  (0) 2022.07.01
Posted by 농부지기
,

[ eGov + nexa 연동 ]

 

1. eGov4.0.0 version을 사용했을 경우

    - (eGov3.10.0 , eGov3.8.0) 버전과 (egOV4.0.0)버전 간에 기본 구성은 거의 동일

    - 달라진점 : 일부 package명이 변경 됨

                         eGov3.10.0 : import egovframework.rte.psl.dataaccess.mapper.Mapper;

                         eGov4.0.0   : import org.egovframe.rte.psl.dataaccess.mapper.Mapper;

 

2. nexa Transaction 호출

    - url : https://www.playnexacro.com/#show:learn:4740  (eGov3.10.0)

             https://www.playnexacro.com/#show:learn:1420  (eGov3.8.0)

 

3. NexacroException 사용하기

    - url : https://www.playnexacro.com/#show:learn:4787   (eGov3.10.0)

             https://www.playnexacro.com/#show:learn:1465   (eGov3.8.0)

 

4. Excel Export, Import 사용하기

    - url : https://www.playnexacro.com/#show:learn:4810   (eGov3.10.0)

              https://www.playnexacro.com/#show:learn:1491   (eGov3.8.0)

 

5. File Upload, Download 사용하기

    - url : https://www.playnexacro.com/#show:learn:4868    (eGov3.10.0)

              https://www.playnexacro.com/#show:learn:1530    (eGov3.8.0)

 

 

 

 

'Nexacro-Framework > eGov & nexa' 카테고리의 다른 글

10. eGov4.0.0 환경설정  (0) 2022.07.02
3. eGov4.0 + uiadapterN  (0) 2022.07.01
2. uiadapter  (0) 2022.07.01
1. eGov4.0.0 설치 및 샘플 프로젝트 만들기  (0) 2022.07.01
Posted by 농부지기
,

[ eGov4.0 + uiadapterN ]

 

0. 정의

    - eGov4.0에 nexaN 용 uiadapter driver(jar) 설치

 

1. eGov4.0에 uiadaptorN  환경설정하기 - 참조 URL

   : 아래 playnexa 를 기반으로 작성 (거의 유사함 ^^)

   - url : https://www.playnexacro.com/#show:learn:4732

   - uiadpater란 : https://www.playnexacro.com/#show:learn:1385

 

2. eGov4.0 프로젝트 생성

    - eGovFrame Web Project 로 프로젝트 생성

    - 프로젝트명 : nexaN

    - [v] Generate Example 체크

 

3. eGov4.0 - Example 실행하기

    - Tomcat 9.0.45

    - java : jdk-16.0.1

      (참고, tomcat 10.0 + jdk-16.0.1 는 오류 발생)

    - db : hsql

    - mybatis

    - tomcat start

    - url : http://localhost:8080  으로 Sample 실행

 

4. uiadapterN 을 사용을 위한 환경설정 파일 

 파일명  설명
 pom.xml  uiadapter 관련 Maven Dependency 설정
 dispatcher-servlet.xml  uiadapter 데이터 변환처리 관련셋팅
 context-nexacro.xml  Mybatis Map 사용시 DB 별 컬럼 생성을 위한 셋팅
 sql-mapper-config.xml  Mybatis 기능 interceptor plugin 셋팅

 

5. uiadapterN 환경설정

    1. java 예제 샘플 패키지 제거

    2. ibatis관련 파일 제거 (mybatis를 사용하기 위해서임)

 

6. context-aspect.xml 파일 설정내용 지우기

7. context-mapper.xml 

     - Mybatis관련 쿼리 xml 경로에 파일들이 아직 없기 때문에 주석처리

9. sql-mapper-config.xml

    - 기존 샘플정보는 삭제.

10. nexaN용 maven 정보

     - 참조 URL : . http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=517154

     - nexaN용 pom.xml 내용

       : 아래처럼 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

 

11. dispatcher-servlet.xml 

      - 파일위치 : /WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml

      - 변경사유 : uiadapter데이터 변환 처리관련 설정

                          uiadapter 모듈의 bean으로 등록하여 사용하기 위한 설정

      - 설정내용

         

 

12. Mybatis의 Map사용시 DB컬럼생성을 위한 Dtabase타입셋팅

    - Database 타입에 맞는 Mybatis Map 의 컬럼생성을 위해 context-nexacro.xml 파일을 생성 후 내용을 작성

    - 현재 전자정부표준프레임워크 샘플예제의 Database 는 hsqldb를 사용하기 때문에 Database 형식을 hsql 로 셋팅

    - 파일경로 : /resources/egovframework/spring/context-nexacro.xml    

    - 설정내용

       

 

 

 

 

13. Mybatis 의 Map 사용시 interceptor plugin 셋팅

     - Mybatis 의 Map 사용시 기본적으로 데이터 조회 후 결과가 없을시 컬럼을 생성하지 않는다.

     - 하지만 Mybatis 의 기능인 interceptor plugin 을 셋팅하면 쿼리 resultType 이 resultMap 일 경우 조회 결과가 없어도 해당 컬럼을 생성한다.

     - 그리하여 Mybatis 설정파일인 sql-mapper-config.xml 파일에 interceptor plugin 내용을 추가합니다

     - 파일경로 : /resources/egovframework/sqlmap/example/sql-mapper-config.xml

     - 파일내용

       

 

99. 오류목록 및 해결방법

1. 오류내용

     오류1:org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.context.support.XmlWebApplicationContext]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/metrics/ApplicationStartup
     오류2:java.lang.NoClassDefFoundError: org/springframework/core/NativeDetector

     해결방법1 : pom.xml 에 추가

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-core</artifactId>
  <version>5.3.8</version>
</dependency>

       해결방법2 : http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459
                          위 url에서 jar를 down받은후 /WEB-INF/lib 밑으로 붙여 넣는다.

                          (nexa pom 설정이 정상적이지 않아서 필요한 jar들이 download되지 않아서 발생)
2. 오류내용
     java.lang.NoSuchMethodError: 'org.springframework.core.metrics.ApplicationStartup org.springframework.beans.factory.config.ConfigurableListableBeanFactory.getApplicationStartup()'
    해결방법 : pom.xml 에 아래내용추가
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>5.3.8</version>
</dependency>  
       해결방법2 : http://support.tobesoft.co.kr/Support/?menu=QnA_View&postid=510459
                          위 url에서 jar를 down받은후 /WEB-INF/lib 밑으로 붙여 넣는다.
                          (nexa pom 설정이 정상적이지 않아서 필요한 jar들이 download되지 않아서 발생)

 

3. 오류내용

       오류1: 

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되지 않아서 발생)

                      

4. 오류내용

       오류: aused by: java.lang.NoClassDefFoundError: org/springframework/web/context/request/async/CallableProcessingInterceptor

       해결방법 : tomcat 삭제 후 다시 추가

'Nexacro-Framework > eGov & nexa' 카테고리의 다른 글

10. eGov4.0.0 환경설정  (0) 2022.07.02
3. eGov + nexa 연동  (0) 2022.07.02
2. uiadapter  (0) 2022.07.01
1. eGov4.0.0 설치 및 샘플 프로젝트 만들기  (0) 2022.07.01
Posted by 농부지기
,