11장 SpringDM 개발환경설정및 HelloSpringDM 예제문의 드립니다.

443 views
Skip to first unread message

건 홍

unread,
Oct 15, 2011, 1:53:22 AM10/15/11
to OSGi &SpringDM
안녕하세요.
저자님 책을 착실히 따라하면서 공부하고 있는 독자중 한명 입니다...^^
우선 책이 발간된지 좀 시간이 지나서 버전이나 url이 안맞아서 좀 많이 고생을 했네요...ㅠㅠ
질문 몇개 정리해서 드립니다...
하루종일 붙잡고 있는데 도저히 해결의 실마리가 안보이네요...

(환경)
eclipse 3.6(Helios)

1. SpringDM_Runtime
원래 예제에 있는 pom이 좀 예전버전이라 최근걸로 바꾸어볼려고 하다가 귀차니즘에.. 예제를 그대로 install해서
target platform에 설정을 했습니다.
근데 lcoation에 ${project_loc}\target 을 해버리니 다른 프로젝트에서 자기의 project_loc 을 가
지고 오더군요..
무슨말이냐 하면은..
SpringDM_Runtime 에서는 "D:\dev\OSGi\OSGi_WorkSpace\SpringDM_Runtime
\target"
이러식으로 잡히는데...
chapter11.HelloSpringDM 프로젝트에서는 "D:\dev\OSGi\OSGi_WorkSpace\
chapter11.HelloSpringDM \target"
이렇게 자기 프로젝트를 base로 설정이 잡히게 되서 에러가 납니다.
참고로 target platform에 추가할때 SpringDM with Jetty.target 화면(Definition)에서 우
측 위 Set as Target Platform이라는 링크를 눌러서 추가 했습니다.

2. chapter11.HelloSpringDM
chapter11.HelloSpringDM 예제에서 spring.xml 파일을 wizard이용해서 만드는데
303페이지의 그림 11-29에 있는 그림처럼 select desired XSD namespace declarations: 항목
에 아무것도 안보입니다..
그래서 어찌어찌 해서.. windows->preferecse 에서 Spring->Beans Support->NameSpaces에
서 Load NamespaceHandlers and XSDs form project's classpath 항목을 체크를 해지하였
더니 보이더군요...
그래서 spring.xml 파일을 만들었는데... X 표시가 뜨네요...ㅠㅠ
아래는 에러 내용입니다.

Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://
www.springframework.org/schema/beans/spring-beans.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>.
- cvc-elt.1: Cannot find the declaration of element 'beans'.

*******************************************************************************************************************************
위 내용에 대해서 답변좀 부탁 드리고...
추가로 11장의 SpringDM 개발환경설정이 최근에 업데이트 되면서 잘 안맞는거 같네요...
참고할수 있는 자료나 최신 pom정리 하신거 있으시면 같이 공유점 부탁 드립니다.
감사합니다.

xguru

unread,
Oct 15, 2011, 1:47:39 PM10/15/11
to OSGi &SpringDM
안녕하세요.

아주 간만에 올라오는 질문글이네요 ^^;

1번의 경우는 크게 문제는 없을것 같습니다.
각기다른 프로젝트에서 사용한다면 폴더를 따로 잡아도 되구요

2번의 경우는, 이렇게 버전이 업그레이드 된 상황에서 가장 난감한 경우라 ㅠㅠ
지금 제쪽에서 똑같은 환경을 만들수가 없고, 제가 겪어보지 않은 경우라 정확한 답변드리기가 곤란하네요.
내용상으로만 봤을때 환경설정에서 Load NamespaceHandlers and XSDs form project's
classpath 옵션을 꺼버리면,
스키마문서를 클래스패스에서 읽는것 자체가 안되서 에러가 날듯 한데요.
사실 이 에러는 spring.xml 에 잘못된 문자 하나만 있어도 날때가 있어서, 정확히 저문제 때문이라고 보기도 곤란합니다.

저 옵션 자체는 키고, spring.xml 파일을 열어서 직접 확인해보시면 어떨까요 ?
현재 설치된 환경에서 일반 springframework 관련 예제들은 돌아가는지도 확인해야 할듯 합니다.

> - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd', because 1)

Reply all
Reply to author
Forward
0 new messages