-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Milestone
Description
An XDMP-BADPINAME exception is returned by MarkLogic Server when parsing XML generated by the XMLDocumentManager.
This only happens when woodstox is added as a dependency to the project.
Steps to recreate the issue:
- Unpack the attached project (ml-java-client-api-woodstox-xml-pi-issue.zip)
- In that project, modify src/main/test/TestHelper.java and modify the necessary credentials (username and password)
- Open src/build.gradle and ensure the compile dependency for woodstox:woodstox-core-asl is not commented out (on line 13):
dependencies {
compile 'org.codehaus.woodstox:woodstox-core-asl:4.4.1'
- cd to the root directory of the project and run the test to see the stack trace:
./gradlew test --debug | grep TestEventLogger
You should see something like this:
13:14:04.176 [DEBUG] [TestEventLogger] InvalidProcessingXMLTest > testRun FAILED
13:14:04.177 [DEBUG] [TestEventLogger] com.marklogic.client.FailedRequestException: Local message: write failed: Internal Server Error. Server Message: XDMP-BADPINAME: xdmp:get-request-body("xml") -- Invalid processing instruction name "xml" at line 1 . See the MarkLogic server error log for further detail.
13:14:04.177 [DEBUG] [TestEventLogger] at com.marklogic.client.impl.JerseyServices.putPostDocumentImpl(JerseyServices.java:1388)
13:14:04.177 [DEBUG] [TestEventLogger] at com.marklogic.client.impl.JerseyServices.patchDocument(JerseyServices.java:1561)
13:14:04.178 [DEBUG] [TestEventLogger] at com.marklogic.client.impl.DocumentManagerImpl.patch(DocumentManagerImpl.java:1138)
13:14:04.178 [DEBUG] [TestEventLogger] at com.marklogic.client.impl.DocumentManagerImpl.patch(DocumentManagerImpl.java:1120)
13:14:04.178 [DEBUG] [TestEventLogger] at com.marklogic.client.impl.DocumentManagerImpl.patch(DocumentManagerImpl.java:1113)
- Open src/build.gradle and ensure the compile dependency for woodstox:woodstox-core-asl is commented out (on line 13):
dependencies {
// compile 'org.codehaus.woodstox:woodstox-core-asl:4.4.1'
- Run the test again to see the test pass:
./gradlew test --debug | grep TestEventLogger
You should see something like this:
13:20:48.735 [DEBUG] [TestEventLogger] InvalidProcessingXMLTest STARTED
13:20:48.773 [DEBUG] [TestEventLogger]
13:20:48.774 [DEBUG] [TestEventLogger] InvalidProcessingXMLTest > testRun STARTED
13:20:49.569 [DEBUG] [TestEventLogger]
13:20:49.569 [DEBUG] [TestEventLogger] InvalidProcessingXMLTest > testRun PASSED
13:20:49.570 [DEBUG] [TestEventLogger]
13:20:49.570 [DEBUG] [TestEventLogger] InvalidProcessingXMLTest PASSED