Grails 2.3.7和Tiles 3.0.3的Maven抛出错误
当我将tiles core 3.0.3包含在grails 2.3.7项目的pom中时,我得到了Grails 2.3.7和Tiles 3.0.3的Maven抛出错误,grails,Grails,当我将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 c
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
原因:java.lang.LinkageError:loader约束冲突:解析重写的方法“org.apache.tools.ant.helper.ProjectHelper2$RootHandler.setDocumentLocator(Lorg/xml/sax/Locator;)V”时,当前类org/apache/tools/ant/helper/ProjectHelper2$RootHandler的类加载器(org/grails/launcher/RootLoader的实例),及其超类加载器(的实例)对于签名中使用的andler.setDocumentLocator(Lorg/xml/sax/Locator;)V类型具有不同的类对象
我假设一个依赖项被一个旧的依赖项覆盖,但我不知道是哪个。有什么想法吗?我试着回到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>
org.apache.tiles
砖芯
${tiles.version}
xml API
xml API