There is a small project that uses spring, after using MAVEN's assembly package into a standalone executable jar package, the following error is executed in the Times:
Configuration problem:unable to locate Spring Namespacehandler for XML schema namespace
This issue is also mentioned on the Internet, which is a bug in assembly. See: Http://jira.codehaus.org/browse/MASSEMBLY-360 The reason is that many of the jar packages in spring contain spring.handlers and Spring.schemas files, and assembly will only break the first encountered file into the jar package, which will be missed later.
The solution is to give up assembly, Use the shade plug-in to package. Specifies that spring.handlers and spring.schemas files are added append in the shade packaging configuration to ensure that the information of the two files in other spring jars is not omitted. Here is an example of a configuration:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>1.4</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration>