Uploaded image for project: 'Abdera'
  1. Abdera
  2. ABDERA-284

Deprecated Axiom interface is used in FOMParser; Axiom version conflict: in compile-time 1.2.5 is used; in runtime (with dependencies through maven) 1.2.10;

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.1, 1.1.1, 1.1.2
    • 1.1.3
    • None
    • tomcat6
      java1.6.0_22

    Description

      In FOMParser.java in getXMLInputFactory() method StAXUtils.getXMLInputFactory(StAXParserConfiguration) is used from Axiom-Api, which is there no more in axiom 1.2.10 (that is used as a dependency in root pom.xml).

      Also about Axiom dependency:

      In file -
      trunk\dependencies\ deps.properties

      you can find dependency to axiom-1.2.5

      axiom.api.jar=axiom-api-1.2.5.jar
      axiom.impl.jar=axiom-impl-1.2.5.jar

      While in pom.xml Axiom-1.2.10 is used (and their interfaces are a bit different)

      <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-api</artifactId>
      <version>1.2.10</version>
      </dependency>

      <dependency>
      <groupId>org.apache.ws.commons.axiom</groupId>
      <artifactId>axiom-impl</artifactId>
      <version>1.2.10</version>

      <exclusions>
      <exclusion>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      </exclusion>
      <exclusion>
      <groupId>stax</groupId>
      <artifactId>stax-api</artifactId>
      </exclusion>
      </exclusions>
      </dependency>


      For this reason, if you will follow directly this instructions -
      https://cwiki.apache.org/confluence/display/ABDERA/Your+first+AtomPub+Server
      with Abdera v >1.0 you will get

      Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(Lorg/apache/axiom/om/util/StAXParserConfiguration;)Ljavax/xml/stream/XMLInputFactory; at org.apache.abdera.parser.stax.FOMParser.getXMLInputFactory(FOMParser.java:152) at org.apache.abdera.parser.stax.FOMParser.createXMLStreamReader(FOMParser.java:178) at org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:143) at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:111) at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:89) at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:71)

      The same problem is reported here -
      http://stackoverflow.com/questions/5337162/apache-abdera-client-response-getdocument-method

      Attachments

        1. ABDERA-284-fix.diff
          1 kB
          Ilya A. Pimenov

        Activity

          People

            veithen Andreas Veithen
            ilya.pimenov Ilya A. Pimenov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: