GWT、Spring、Maven 和 Eclipse 表现不佳。我试图在我的本地机器上以开发模式运行(一个相当大的)项目。我能够成功构建应用程序,但无法在 Eclipse 中运行它。生产模式在使用mvn gwt:run
.
我已将其缩小到 xsd 架构的问题。它无法<aop:scoped-proxy />
在我的 context.xml 文件中解析。
我正在使用 GWT 2.5、Spring 3.0.5-RELEASE 和 Maven 3.0.4。我已经明确地将 spring-aop-3.0.5-RELEASE.jar 添加到我的类路径中,但仍然没有运气。
appContext.xml 顶部
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd "
default-init-method="init" default-lazy-init="true">
标准输出
Nested in org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 131 in XML document from class path resource [appContext.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
'aop:scoped-proxy'.:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is
strict, but no declaration can be found for element 'aop:scoped-proxy'.
日志文件
[main] WARN factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document
'http://www.springframework.org/schema/aop/spring-aop-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 <xsd:schema>.