Search code examples
mavencmisapache-chemistry

java.lang.NoSuchMethodError: com.sun.xml.internal.ws.api.message.Message.getHeaders


I'm trying to connect to a CMIS server with Apache Chemistry, when it is configured with an AtomPumb url it works ok, but when I swith to webservices and when it tries to create a session it throws this error:

    java.lang.NoSuchMethodError: com.sun.xml.internal.ws.api.message.Message.getHeaders()
    Lcom/sun/xml/internal/ws/api/message/HeaderList;

these are the dependencies in my POM:

    <!-- * * * * * * * * * * * * * * * * * * * * -->

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-commons-api</artifactId>
        <version>0.13.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-impl</artifactId>
        <version>0.13.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-commons-impl</artifactId>
        <version>0.13.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-bindings</artifactId>
        <version>0.13.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-api</artifactId>
        <version>0.13.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-workbench</artifactId>
        <version>0.13.0</version>
    </dependency>

    <!-- * * * * * * * * * * * * * * * * * * * * -->

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
    </dependency>

    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.21</version>
    </dependency>

what is the problem? that class is in the rt.jar, that is in the jre lib folder.


Solution

  • There is an issue with OpenCMIS 0.13.0 on Java 8. See https://issues.apache.org/jira/browse/CMIS-917. This has been fixed in OpenCMIS 0.14.0.

    Avoid the CMIS Web Services binding! The other CMIS bindings are significantly faster!