我一直堅持這一段時間。我一直在開發一個gwt + spring後端java項目。我的項目是一個GWT項目和另一個用於spring服務的java項目的結構,等等。每個項目都包含它們各自的spring-config文件。而試圖如果我是使用 tx:annotation-driven
STS + gwt + spring-config文件+ tx:註釋命名空間
我不斷得到下面的加載彈簧CONFIGS。 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>.
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.
應何況我部署在內部使用谷歌Eclipse插件STS GWT的容器。
我春天的servlet命名空間開始爲這樣
<?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"/>
我已經經歷了很多的職位去了解它,但一直沒能解決的問題。 一個)嘗試到架構導入到使用XML的目錄 : 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
和類型爲模式位置。
欣賞任何幫助或指針!
好的。我只是將jar添加到web-inf/lib中並將其添加到xml目錄中。不知道是否第二個是必需的。只是想知道爲什麼發生這種情況。我在春天有Maven依賴關係。 – sunny 2011-05-13 20:23:51