org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document '/spring-beans-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
폐쇄망에서 실행 시 이런 에러가 난다면..
1. 인터넷이 되는 환경에서 한번 실행한 후 폐쇄망으로 그대로 옮겨서 개발을 한다.
(한번 실행을 했기 때문에 필요한 파일들은 내려받아져 있다.)
2. 폐쇄망에서 환경을 세팅해야 한다면.. 필요한 파일들을 USB등에 담아서 폐쇄망으로 옮긴다.
1,2번 방법으로 실행할 때
servlet-context.xml상단에 선언되어 있는 beans 링크가 수정되어야 한다.
웹사이트에서 받아오는게 아니고 이미 가지고 있는 jar안에서 읽어 올 수 있도록 변경이 필요하다.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.xsd"
>
기존의 작성법이 이랬다면
아래와 같이 classpath:org/~로 변경을 해줘야 한다.
이 주소는 필요한 스키마가 포함된 jar을 열어서 /META-INF/spring.schemas을 열면 확인할 수 있다.
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
classpath:org/springframework/beans/factory/xml/spring-context-3.0.xsd"
Spring schemaLocation fails when there is no internet connection
I am using Spring and in application-context.xml I have the following definitions: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xm...
stackoverflow.com
https://slipp.net/questions/329
내부망에서 인터넷없이 어떻게 개발하세요?
안녕하세요. 증권사에 종사하고 있는 개발자 황대장입니다. 저희 회사는 보안상의 문제로 인터넷망과 내부망이 분리되어 있는데요. 인터넷 없이 개발을 하려니까 무척 힘드네요... 이클립스에
slipp.net
https://biblehan.tistory.com/5
[이클립스]오프라인 환경에서 maven 구성하는 방법
오프라인 환경에서 maven 구성하는 방법이 왜 필요한 지, 어떻게 구성하는 지 알아보자. 개발을 하다보면 종종 보안 등을 이유로 폐쇄망 환경이나 인터넷이 차단된 곳에서 개발을 해야하는 경우
biblehan.tistory.com
폐쇄망 Maven 사용하기
현 회사는 개발 환경이 인터넷이 안되는 폐쇠망에서 개발 하는 곳이다. 개발 PC와 IDC 서버간 전용선...
blog.naver.com
https://okky.kr/article/412245
OKKY | 인터넷 없이 메이븐 사용시 질문입니다.
현재 이클립스 스프링 4.0 메이븐으로 개발중입니다. 메이븐 빌드해서 운영 WAS에 올려서 돌리고 있어요. 근데 이번에 이 소스들을 새로운 환경... 외부 인터넷이 안되는 환경에 가져가서 개발
okky.kr
https://waspro.tistory.com/509
[Spring Boot] Spring Boot Maven Repo 구축(Nexus2 OSS 내부 저장소)
이번 포스팅에서는 Spring Boot에서 사용하는 Maven Dependency 리포지토리인 Nexus2 내부 저장소 구축 과정에 대해 살펴보겠습니다. 지난 몇번의 포스팅 동안 폐쇄망 환경에서 구성해야 하는 여러 고려
waspro.tistory.com
'차근차근 > 이것저것' 카테고리의 다른 글
URL / URI 차이 (0) | 2021.12.24 |
---|---|
폐쇄망 프로젝트 구동시 에러..엄청남 -추가중 (0) | 2021.12.21 |
Facebook 픽셀 (0) | 2021.12.16 |
Apache Log4j 2 보안 업데이트 권고 (0) | 2021.12.15 |
Procedural Programming 절차적 프로그래밍 (0) | 2021.12.13 |