unable to locate Spring NamespaceHandler error

前端 未结 1 2123
死守一世寂寞
死守一世寂寞 2021-02-19 00:09

I have been having this error for nearly a week now and im just about ready to give in. I have used Maven2 to make the BIG jar file. When I run the jar file using:



        
1条回答
  •  借酒劲吻你
    2021-02-19 01:04

    Very likely what has happened is the files which provides meta data to Spring about the location of the custom namespace handlers(spring.schema, spring.handlers) have ended up overwriting each other when you created the big(uber) jar.

    To clarify this a little more, if you are using context name space say - context:property-placeholder-configurer, the information about how to parse this namespace is using a spring.handlers file in spring-context.jar!:/META-INF/spring.handlers file, a similar file is present in other spring jar files for other custom namespaces support. Now, when you create the Uber jar, since the location of the handler file is exactly the same, one spring.handler file will end up overwriting the others, and you see the error that you are seeing. Some potential fixes are described here, where some alternate ways of creating the executable jar is suggested:

    How to create spring-based executable jar with maven?

    0 讨论(0)
提交回复
热议问题