我已经搜索了许多类似的问题,但似乎没有人能够解决这个问题,所以我希望有人能够解决这个问题:
我正在努力解决这个错误:
2014-11-06 12:21:57 DEBUG PluggableSchemaResolver:147 - Loaded schema mappings: {}
2014-11-06 12:21:58 DEBUG DefaultBeanDefinitionDocumentReader:108 - Loading bean definitions
2014-11-06 12:21:58 DEBUG DefaultNamespaceHandlerResolver:157 - Loaded NamespaceHandler mappings: {}
Caused by: java.lang.RuntimeException: Exception in Application start method
....
Caused by: java.lang.RuntimeException: Exception in Application start method
....
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context]
Offending resource: class path resource [clientSpringConfig.xml]
这是我的程序客户端POM的一大块。
<execution>
<id>myClient</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>C:\Dev\MyAppDeploy\Client\MyAppClient.jar</outputFile>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>uk.co.mycom.myClient.ClientStart</Main-Class>
<Class-Path>.</Class-Path>
</manifestEntries>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<includes>
<include>uk/co/mycom/myClient/**</include>
<include>uk/co/mycom/shared/**</include>
<include>com/esotericsoftware/**</include>
<include>org/springframework/**</include>
<include>org/apache/log4j/**</include>
<include>log4j.properties</include>
<include>org/apache/commons/logging/**</include>
<include>org/objenesis/**</include>
</includes>
<excludes>
<exclude>uk/co/mycom/myAppServer/**</exclude>
<!--<exclude>resources/**</exclude>-->
<exclude>bat/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
我喜欢Maven的阴影,感觉厌恶移动,但我需要使用Spring客户端,所以之前工作的东西不再有效。我似乎是民间建议Maven Assembly插件。但据我所知,结果是一样的:如果两个文件匹配,一个将覆盖另一个。
任何帮助非常感谢。 感谢。