mavenapache-abdera

AbstractMethodError due to Apache Abdera Dependency


I am using following Apache Abdera dependency for consuming an Atom feed.

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

After I add abdera dependency into pom.xml, I receive an AbstractMethodError from another service. Following is the stack trace:

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]

I am using Java 7.


Solution

  • I checked maven transitive dependencies and saw that xerces is included by multiple libraries including Apache Abdera.

    To resolve this error, I updated dependency configuration by excluding xerces dependency as follows:

        <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>