grails - Grails 2.3.7 和 Tiles 3.0.3 的 Maven 抛出错误

标签 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 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/

相关文章:

grails - Grails 2.4.4是否支持SCSS?

grails - Grails使与休眠的连接动态变化

grails - 如何在 grails 响应中添加状态消息

sql - GORM查询产生数据库错误(grails 1.1.1)

rest - 使用 grails.plugins.rest.client.RestResponse 获取 img/png

gradle - Bootrun因grails应用程序而失败,但构建成功

grails - 从URL下载内容而不提示在Grails中进行身份验证

Grails Controller - 动态方法文档

Grails:通过与字符串的一对多关联查找

grails - 如果情况下,在不真实的情况下奇怪地调用合并