marklogic-community / marklogic-samplestack

A sample implementation of the MarkLogic Reference Architecture
Apache License 2.0
82 stars 56 forks source link

400 bad request with ./gradlew mlInit #694

Closed gghai closed 8 years ago

gghai commented 8 years ago

With the 8.0 nightly ML build and marklogic-samplestack( develop branch) , running ./gradlew mlInit I am seeing below error on Windows and Linux .

Can you confirm if it’s a bug or setup issue ; do I need to install new gradle plugin mentioned below or its come as pre-packaged ?

builder@rh6-intel64-80-qa-dev-2$ ./gradlew mlInit :buildSrc:compileJava UP-TO-DATE :buildSrc:compileGroovy UP-TO-DATE :buildSrc:processResources UP-TO-DATE :buildSrc:classes UP-TO-DATE :buildSrc:jar UP-TO-DATE :buildSrc:assemble UP-TO-DATE :buildSrc:compileTestJava UP-TO-DATE :buildSrc:compileTestGroovy UP-TO-DATE :buildSrc:processTestResources UP-TO-DATE :buildSrc:testClasses UP-TO-DATE :buildSrc:test UP-TO-DATE :buildSrc:check UP-TO-DATE :buildSrc:build UP-TO-DATE

Initializing ml-gradle Setting config dir to: ../../database/ml-config App name: samplestack App host: localhost App username: samplestack-admin App REST port: 8006 Manage host: localhost Manage username: admin Admin host: localhost Admin username: admin Finished initializing ml-gradle

:mlInit POST request for "http://localhost:8001/admin/v1/init" resulted in 400 (Bad Request); invoking error handler Caught error, response body: {"errorResponse":{"statusCode":"400", "status":"Bad Request", "messageC ode":"MANAGE-EMPTYPAYLOAD", "message":"MANAGE-EMPTYPAYLOAD: (err:FOER0000) Payload is empty. XML or JSON payloads cannot be empty."}} :mlInit FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

gghai commented 8 years ago

With freshly checkout git develop branch and 8.0 ML nightly ( 10/13) on linux ; on accessing the http://localhost:8001 url I initialized the server . Now the screen i see is

join a cluster

From marklogic-samplestack/appserver/java-spring running ./gradlew appserver gives

builder@rh6-intel64-80-qa-dev-2$ ./gradlew appserver :buildSrc:clean UP-TO-DATE :buildSrc:compileJava UP-TO-DATE :buildSrc:compileGroovy :buildSrc:processResources UP-TO-DATE :buildSrc:classes :buildSrc:jar :buildSrc:assemble :buildSrc:compileTestJava UP-TO-DATE :buildSrc:compileTestGroovy UP-TO-DATE :buildSrc:processTestResources UP-TO-DATE :buildSrc:testClasses UP-TO-DATE :buildSrc:test UP-TO-DATE :buildSrc:check UP-TO-DATE :buildSrc:build

Initializing ml-gradle Setting config dir to: ../../database/ml-config App name: samplestack App host: localhost App username: samplestack-admin App REST port: 8006 Manage host: localhost Manage username: admin Admin host: localhost Admin username: admin Finished initializing ml-gradle

:compileJava /home/builder/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.1.4.RELEASE/5c 66d0962e89ee577627a526b6b299a5337072be/spring-context-4.1.4.RELEASE.jar(org/springframework/context/ annotation/PropertySource.class): warning: Cannot find annotation method 'value()' in type 'Repeatab le': class file for java.lang.annotation.Repeatable not found 1 warning :compileGroovy UP-TO-DATE :processResources :classes :jar :findMainClass :startScripts :distTar :distZip :bootRepackage :mlDeleteModuleTimestampsFile :mlInit POST request for "http://localhost:8001/admin/v1/init" resulted in 400 (Bad Request); invoking error handler Caught error, response body: {"errorResponse":{"statusCode":"400", "status":"Bad Request", "messageC ode":"MANAGE-EMPTYPAYLOAD", "message":"MANAGE-EMPTYPAYLOAD: (err:FOER0000) Payload is empty. XML or JSON payloads cannot be empty."}} :mlInit FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

laurelnaiad commented 8 years ago

This was due to running on a nightly build with a ml-gradle build that wasn't yet compatible.

gghai commented 8 years ago

Working fine . Verified on windows and linux