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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Mounika Nannaka
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?
Loading...