Apache Abdera Dependency引起的AbstractMethodError

时间:2015-02-27 07:49:37

标签: maven apache-abdera

我正在使用以下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.

1 个答案:

答案 0 :(得分:0)

我检查了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>
相关问题