폐쇄망에서 개발하기(인터넷x)

폐쇄망에서 개발하기(인터넷x)

반응형

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 .

폐쇄망에서 실행 시 이런 에러가 난다면..

1. 인터넷이 되는 환경에서 한번 실행한 후 폐쇄망으로 그대로 옮겨서 개발을 한다.

(한번 실행을 했기 때문에 필요한 파일들은 내려받아져 있다.)

2. 폐쇄망에서 환경을 세팅해야 한다면.. 필요한 파일들을 USB등에 담아서 폐쇄망으로 옮긴다.

1,2번 방법으로 실행할 때

servlet-context.xml상단에 선언되어 있는 beans 링크가 수정되어야 한다.

웹사이트에서 받아오는게 아니고 이미 가지고 있는 jar안에서 읽어 올 수 있도록 변경이 필요하다.

기존의 작성법이 이랬다면

아래와 같이 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"

https://stackoverflow.com/questions/1729307/spring-schemalocation-fails-when-there-is-no-internet-connection

https://slipp.net/questions/329

https://biblehan.tistory.com/5

https://blog.naver.com/PostView.naver?blogId=utime&logNo;=221384566619&categoryNo;=2&parentCategoryNo;=0&viewDate;=¤tPage=1&postListTopCurrentPage;=1&from;=postView

https://okky.kr/article/412245

https://waspro.tistory.com/509

반응형

from http://action713.tistory.com/1696 by ccl(A) rewrite - 2021-12-16 17:01:09