【问题标题】:does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface没有实现 [org.springframework.beans.factory.xml.NamespaceHandler] 接口
【发布时间】:2019-10-07 16:46:03
【问题描述】:

我收到以下错误:- Caused by: org.springframework.beans.FatalBeanException: Class [org.springframework.transaction.config.TxNamespaceHandler] for namespace [http://www.springframework.org/schema/tx] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:128) ~[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE] 我检查了 lib 文件夹,它是 spring-beans-3.2、spring-tx 和 spring-context-3.2 jar 文件。我使用了以下命名空间:- http://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.2.xsd.

Classpath 有所需的 jars 文件。

请帮助解决错误。

Windows 7

【问题讨论】:

  • 让我猜猜部署到像 WebLogic 这样的应用服务器?
  • 我不确定您的 spring-context 依赖项是否不匹配。如果可能,请在您的问题中添加 pom.xml 或添加完整的堆栈跟踪
  • @M.Deinum 是的,它发生在 weblogic 12cR2 上,任何帮助将不胜感激。

标签: java spring


【解决方案1】:

试试这个xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd。如果您得到相同的结果,请从上下文和 bean 中删除版本 -3.2

【讨论】:

  • 更改 xsd 声明无助于解决这个问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-13
相关资源
最近更新 更多