The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'

后端 未结 9 2345
夕颜
夕颜 2020-11-29 09:11

I am trying to configure JSF+Spring+hibernate and I\'m tying to run a test but when I use this \"tx:annotation-driven\" on my application-context.xml file, I get this error:

9条回答
  •  旧巷少年郎
    2020-11-29 09:31

    For me the thing that worked was the order in which the namespaces were defined in the xsi:schemaLocation tag : [ since the version was all good and also it was transaction-manager already ]

    The error was with :

     http://www.springframework.org/schema/mvc
     http://www.springframework.org/schema/tx
     http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
     http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
    

    AND RESOLVED WITH :

    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
    

提交回复
热议问题