I'm attempting to create a document in my collection using typesenseClient.collections("collection-name").documents().create(document);
However, I'm getting the following error message
Internal Server Error - Error id 142e7db4-8c21-450f-acc1-288b15d368a2-2, org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
When I try and directly hit the create endpoint with postman it successfully creates a document.
Steps to reproduce
I initialized the client using
List<Node> nodes = new ArrayList<>();
nodes.add(
new Node(
"https",
"<typesense-cloud>",
"443"
)
);
String apiKey = "***"
Configuration configuration = new Configuration(nodes, Duration.ofSeconds(2),apiKey);
typesenseClient = new Client(configuration);
I'm able to do a retrieve using this client.
Then, I try to upload a document using
ImportDocumentsParameters importDocumentsParameters = new ImportDocumentsParameters();
importDocumentsParameters.dirtyValues(ImportDocumentsParameters.DirtyValuesEnum.COERCE_OR_DROP);
importDocumentsParameters.action("create");
typesenseClient.collections("collection-name").documents().create(document);
Expected Behavior
Document is successfully created in my collection.
Actual Behavior
I get the following error message
Internal Server Error - Error id 565e6fa7-220e-4afa-8f62-ae1890d1bf5d-1,
org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: 'okhttp3.RequestBody
okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
Description
I'm attempting to create a document in my collection using
typesenseClient.collections("collection-name").documents().create(document);
However, I'm getting the following error message
Internal Server Error - Error id 142e7db4-8c21-450f-acc1-288b15d368a2-2, org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
When I try and directly hit the create endpoint with postman it successfully creates a document.
Steps to reproduce
I initialized the client using
I'm able to do a retrieve using this client.
Then, I try to upload a document using
Expected Behavior
Document is successfully created in my collection.
Actual Behavior
I get the following error message
Metadata
Typesense Version: 0.5.0
OS: Windows 11