我正在尝试使用Apache Chemistry连接到CMIS服务器,当它配置了AtomPumb url时,它可以正常工作,但当我切换到Web服务时,当它试图创建会话时,它会抛出以下错误:
java.lang.NoSuchMethodError: com.sun.xml.internal.ws.api.message.Message.getHeaders()
Lcom/sun/xml/internal/ws/api/message/HeaderList;
这些是我的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>
问题出在哪里?这个类在rt.jar中,也就是jre-lib文件夹中。
Java 8上的OpenCMIS 0.13.0存在问题。看见https://issues.apache.org/jira/browse/CMIS-917.这已在OpenCMIS 0.14.0中修复。
避免CMIS Web服务绑定!其他CMIS绑定明显更快