0

我正在尝试运行我的嵌入式 Tomcat 应用程序,但出现以下错误:

BeanDefinitionParsingException: 
Configuration problem: 
Unable to locate Spring NamespaceHandler for XML schema namespace
[http://www.springframework.org/schema/tx]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

我非常有信心我的类路径上的所有内容都正确 - 你可以tx看到/transaction/

$ jar tf webapp.jar | grep 'springframework/[a-z]*/$'
org/springframework/cache/
org/springframework/context/
org/springframework/ejb/
org/springframework/format/
org/springframework/instrument/
org/springframework/jmx/
org/springframework/jndi/
org/springframework/remoting/
org/springframework/scheduling/
org/springframework/scripting/
org/springframework/stereotype/
org/springframework/ui/
org/springframework/validation/
org/springframework/aop/
org/springframework/asm/
org/springframework/beans/
org/springframework/core/
org/springframework/util/
org/springframework/expression/
org/springframework/orm/
org/springframework/jdbc/
org/springframework/dao/
org/springframework/jca/
org/springframework/transaction/
org/springframework/web/
org/springframework/mail/
org/springframework/http/
org/springframework/mock/

我不明白的是,在 Intellij IDEA 中运行应用程序可以按预期工作,并且也可以部署到 Tomcat 服务器。

可能是什么问题?我应该去哪里看?谢谢。

4

1 回答 1

0

我在这里找到了我的问题的答案:

http://forum.springsource.org/showthread.php?48787-Unable-to-locate-NamespaceHandler-when-using-context-annotation-config&p=191820#post191820

这导致这里:

http://forum.springsource.org/showthread.php?48787-Unable-to-locate-NamespaceHandler-when-using-context-annotation-config&p=191820#post191820

问题是程序集 maven 插件解包所有 jar 并覆盖相同的内容。

于 2013-07-24T21:18:18.247 回答