当我将tiles-core 3.0.3包含在我的grails 2.3.7项目的pom中时,我得到了。
Caused by: java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.tools.ant.helper.ProjectHelper2$RootHandler.setDocumentLocator(Lorg/xml/sax/Locator;)V" the class loader (instance of org/grails/launcher/RootLoader) of the current class, org/apache/tools/ant/helper/ProjectHelper2$RootHandler, and its superclass loader (instance of <bootloader>), have different Class objects for the type andler.setDocumentLocator(Lorg/xml/sax/Locator;)V used in the signature
我假设某个依赖项正在被旧的依赖项覆盖,但我不知道是哪个。有任何想法吗?我尝试在图 block 上返回 2.0.1,但仍然得到相同的结果。
最佳答案
应该是
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>${tiles.version}</version>
<!-- IMPORTANT -->
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>
</dependency>
关于grails - Grails 2.3.7 和 Tiles 3.0.3 的 Maven 抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23140496/