Marklogic XML读取抛出球衣多部分异常

时间:2015-12-17 15:21:32

标签: json xml jersey marklogic marklogic-8

我正在阅读使用以下代码

存储在Marklogic中的XML
            // get a manager for text documents
            XMLDocumentManager docMgr = client.newXMLDocumentManager();

            // create a handle to receive the document content
            DOMHandle handle = new DOMHandle();

            // create a handle to receive the document metadata
            DocumentMetadataHandle metadata = new DocumentMetadataHandle();

            // read the document content
            docMgr.read(documentPath, metadata, handle); //documentPath is the document's URI

但上面的read方法是抛出异常,如下所示

Dec 17, 2015 8:38:04 PM com.sun.jersey.api.client.ClientResponse getEntity
SEVERE: A message body reader for Java class com.sun.jersey.multipart.MultiPart, and Java type class com.sun.jersey.multipart.MultiPart, and MIME media type multipart/mixed; boundary=Boundary_1_1651318690_1450364883614 was not found
Dec 17, 2015 8:38:04 PM com.sun.jersey.api.client.ClientResponse getEntity
SEVERE: The registered message body readers compatible with the MIME media type are:
*/* ->
  com.sun.jersey.core.impl.provider.entity.FormProvider
  com.sun.jersey.core.impl.provider.entity.StringProvider
  com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
  com.sun.jersey.core.impl.provider.entity.FileProvider
  com.sun.jersey.core.impl.provider.entity.InputStreamProvider
  com.sun.jersey.core.impl.provider.entity.DataSourceProvider
  com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
  com.sun.jersey.core.impl.provider.entity.ReaderProvider
  com.sun.jersey.core.impl.provider.entity.DocumentProvider
  com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader
  com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader
  com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader
  com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
  com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
  com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General
  com.sun.jersey.core.impl.provider.entity.EntityHolderReader

我的maven coonfig如下

<dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
            <version>1.17.1</version>
        </dependency>

        <dependency>
            <groupId>com.marklogic</groupId>
            <artifactId>java-client-api</artifactId>
            <version>3.0.3</version>
        </dependency>

这是由于与这两个罐子或任何其他问题发生冲突吗?

0 个答案:

没有答案