개발 관련 모음/기타

전자정부프레임워크 톰캣실행

mini 아카이브 사서 2025. 3. 5. 15:25
반응형

전자정부프레임워크 톰캣실행

 

 

전자정부 프레임 워크를 설치를 하고  간단하게 아파치 톰캣을 실행 시켜보자

 

1. 프로젝트 생성

eGovFrame Web Project로 진행해보자 기본적인 세팅 되어 있는 프로젝트이다.

2. 아파치 톰캣 다운 및 설정

Servers 가 안보인다면 상단Window 에 들어가서 show view 에 들어가서 검색하면 됩니다.

 

 

                                     클릭을 하고 진행하면 됩니다.

만약 톰캣이 없다고 하면

https://tomcat.apache.org/download-90.cgi

 

Apache Tomcat® - Apache Tomcat 9 Software Downloads

Welcome to the Apache Tomcat® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? Specification version

tomcat.apache.org

64 bit Windows를 설치하면 된다. 혹시 본인 컴퓨터가 32bit이면 32bit로
Browse를 클릭 후 아까 다운 받았던 파일 압축을 푼 파일 위치 경로로 제 Name에 (2)가 있는 이유는 이미 한번 만들었기 때문입니다.

 

Finish 를 눌러주세요

 

3. 실행

여기서 벌레 버튼을 클릭하면 디버그 모드 그 옆을 누르면 일반 실행 알아서 선택해서 작동하시면 됩니다.
다음과 같이 결과 출력

 

4. 오류 발생 (만약에 다음과 같은 오류가 발생하는 경우)

    ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed

     이런식으로 오류가 발생한 경우

    Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0' defined in ServletContext resource [/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml]: Cannot create inner bean 'egovframework.example.cmmn.web.EgovBindingInitializer#7b1d3a05' of type [egovframework.example.cmmn.web.EgovBindingInitializer] while setting bean property 'webBindingInitializer'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [egovframework.example.cmmn.web.EgovBindingInitializer] for bean with name 'egovframework.example.cmmn.web.EgovBindingInitializer#7b1d3a05' defined in ServletContext resource [/WEB-INF/config/egovframework/springmvc/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: egovframework.example.cmmn.web.EgovBindingInitializer

 

다음과 같이 오류가 발생한 경우 

1. 프로젝트 clean 처리를 한다.

2. Project => build Project를 작업을 한다. (비활성화면 패스)

3. Project => Update Maven Project 를 진행한다.

4. 프로젝트 우클릭 이후에 새로고침 작업을 한다.

 

실행 시켜보고 오류가 발생시 다시 한번 위 를 반복하면 해결된다.

 

일단 저의 경우에는 분명히 clean 처리도 하고 build 작업도 했지만 이상하게 위와 같은 오류가 나와서 

위 방법은 2번 반복했더니 해결했다. 추측 하기로는 EgovBindingInitializer.class  빌드 하는 과정에서 문제가 있지 않았나 싶다. 

 

반응형