users@jersey.java.net

[Jersey] Getting A message body writer 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_315138752_1470576503340 was not found while trying to write documents on MarkLogic server through java marklogic client api

From: Mounika Nannaka <mounika.nannakal_at_gmail.com>
Date: Sun, 7 Aug 2016 06:50:28 -0700 (MST)

Below is my marklogic java client api code,
public static void example1() {
        // Create some example content and metadata
        StringHandle doc1 = new StringHandle(
                "{\"key1\": \"value1\"}").withFormat(Format.JSON);
        StringHandle doc2 = new StringHandle(
                "{\"key2\": \"value2\"}").withFormat(Format.JSON);

        // Create and populate the batch of docs to write
        
        DatabaseClient client = returnClient();
        
        JSONDocumentManager docMgr = client.newJSONDocumentManager();
        DocumentWriteSet batch = docMgr.newWriteSet();
        batch.add("doc3.json", doc1);
        batch.add("doc4.json", doc2);
        // Perform the write operation
        docMgr.write(batch);
        }

When I execute this code it is throwing A message body writer 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_315138752_1470576503340 was not found
exception in line docMgr.write(batch); Can anyone find solution for this?




--
View this message in context: http://jersey.576304.n2.nabble.com/Getting-A-message-body-writer-for-Java-class-com-sun-jersey-multipart-MultiPart-and-Java-type-class-i-tp7583839.html
Sent from the Jersey mailing list archive at Nabble.com.