【问题标题】:AbstractMethodError due to Apache Abdera DependencyAbstractMethodError 由于 Apache Abdera 依赖关系
【发布时间】:2015-02-27 07:49:37
【问题描述】:

我正在使用以下 Apache Abdera 依赖项来使用 Atom 提要。

    <dependency>
        <groupId>org.apache.abdera</groupId>
        <artifactId>abdera-parser</artifactId>
        <version>1.1.3</version>
    </dependency>

在我将 abdera 依赖项添加到 pom.xml 后,我收到来自另一个服务的 AbstractMethodError。以下是堆栈跟踪:

Caused by: java.lang.AbstractMethodError
    at org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:1110) [cxf-common-utilities-2.4.6.jar:2.4.6]
    at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:998) [cxf-common-utilities-2.4.6.jar:2.4.6]
    at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:971) [cxf-common-utilities-2.4.6.jar:2.4.6]
    at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:898) [cxf-common-utilities-2.4.6.jar:2.4.6]

我正在使用 Java 7。

【问题讨论】:

    标签: maven apache-abdera


    【解决方案1】:

    我检查了 maven 传递依赖项,发现 xerces 包含在多个库中,包括 Apache Abdera

    为解决此错误,我通过排除 xerces 依赖项来更新依赖项配置,如下所示:

        <dependency>
            <groupId>org.apache.abdera</groupId>
            <artifactId>abdera-parser</artifactId>
            <version>1.1.3</version>
            <exclusions>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-22
      • 2022-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多