我使用的是日食,当我尝试运行在开发模式我的春天GWT应用解析applicationContext.xml文件时,我得到以下异常:XML错误运行时,在开发模式弹簧GWT应用
Ignored XML validation warning
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>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
(...)
Context initialization failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 51 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
而且我applicationContext.xml文件开头是这样的:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
(...) 线51 ---><tx:annotation-driven transaction-manager="transactionManager"/>
是否任意子呃知道发生了什么?
你知道,我有一个这样的问题,几个星期前,这个来自Spring的。我最终做的是从POM开始:(我认为你的POM存在问题(我有一个问题),也许你的maven-war-plugin正确地导出了所有的.jar文件,但你的gwt插件不能。指出你的战争目标,并建立目录,看看他们是否得到spring-tx。希望你找到自己的方式! –
2011-03-30 14:55:41
你能告诉我究竟在哪里以及我要检查什么吗?因为我认为为了在开发模式下运行它,没有必要创造一场战争(那个,或者我看不到任何地方!) 感谢您的帮助,并为我的新手问题感到抱歉! – Neets 2011-03-30 15:21:36