0

나는 한동안이 일에 매달 렸습니다. 나는 gwt + spring 백엔드 java 프로젝트를 개발 해왔다. 내 프로젝트는 GWT 프로젝트와 스프링 서비스를위한 또 다른 자바 프로젝트 등으로 구성된 구조이다. 각 프로젝트에는 각각의 spring-config 파일이 있습니다. 사용하는 경우 스프링 구성을로드하려고 시도하는 중 tx:annotation-drivenSTS + gwt + spring-config 파일 + tx : 주석 네임 스페이스

다음과 같이 계속 표시됩니다.

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.

org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx-3.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>.

내가 일식에 대한 구글 플러그인을 사용하여 STS 내부 GWT 컨테이너에 배포하고 언급해야한다.

내 스프링 서블릿 네임 스페이스는 너무

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="h ttp://www.w3.org/2001/XMLSchema-instance" xmlns:aop="h ttp://www.springframework.org/schema/aop" xmlns:context="h ttp://www.springframework.org/schema/context" xmlns:p="h ttp://www.springframework.org/schema/p" xmlns:util="h ttp://www.springframework.org/schema/util" xmlns:tx="h ttp://www.springframework.org/schema/tx" xsi:schemaLocation="h ttp://www.springframework.org/schema/aop h ttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd h ttp://www.springframework.org/schema/beans h ttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd h ttp://www.springframework.org/schema/util h ttp://www.springframework.org/schema/util/spring-util-3.0.xsd h ttp://www.springframework.org/schema/tx h ttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd h ttp://www.springframework.org/schema/context h ttp://www.springframework.org/schema/context/spring-context-3.0.xsd"> <tx:annotation-driven transaction-manager="transactionManager"/>

내가 그것을 이해하는 글을 많이 겪었지만이 문제를 해결할 수 없었다 시작한다. a) jar:file:path/to/spring-framework-3.0.5.RELEASE/dist/org.springframework.transaction-3.0.5.RELEASE.jar!/org/springframework/transaction/config/spring-tx-3.0.xsd 키를 http://www.springframework.org/schema/context/spring-context-3.0.xsd으로 사용하고 스키마 위치로 입력하여 스키마를 XML 카탈로그 으로 가져 오려고했습니다.

도움이나 조언이 도움이됩니다.

+0

확인. 방금 jar 파일을 web-inf/lib에 추가하고 XML 카탈로그에 추가했습니다. 두 번째가 필요한지 확실하지 않은 tho. 왜 이런 일이 일어나는지 알고 싶었습니다. 나는 봄에 대한 의존성이있다. – sunny

답변

0

STS 및 maven이 포함 된 환경에서 유사한 문제를 겪고있는 다른 사람들을위한 것입니다. 올바른 jar 파일을 pom.xml에 추가 한 다음 ur dependencies를 업데이트하십시오. 작업 공간을 새로 고침하십시오. 프로젝트를 닫고 -clean 옵션으로 STS를 다시 열거 나 다시 시작하십시오. 위의 중 하나가 효과가 있습니다. HTH