I am using MarkLogic 11.0.0 and Gradle 8.13 for module deployment. My gradle.properties file is as follows:
mlHost=localhost
mlRestPort=9090
mlUsername=admin
mlPassword=admin
mlAuthentication=basic
I have already created an HTTP server on port 9090 and attached it to the appropriate content and modules database.
However, when I run the following command:
gradle mlLoadModules
I get the following error:
Execution failed for task ':mlLoadModules'.
> Local message: config/properties write failed: Method Not Allowed.
Server Message: Server (not a REST instance?) did not respond with an expected REST Error message.
Can anyone please suggest how to resolve this issue?
When you configure mlRestPort=9090
then ml-gradle expects the application server to be a REST API server. A REST API instance is an HTTP App Server specially configured to service HTTP requests against the API.
You can configure and create the application server via ml-gradle: https://github.com/marklogic/ml-gradle/wiki/Resource-reference#rest-apis
If you were to create the appserver manually, then the documentation explains how to create an instance.
But if this is an existing application server, you could set that application server URL Rewriter to use "/MarkLogic/rest-api/rewriter.xml
" and then should be able to proceed.