Contribute to Open Source. Search issue labels to find the right project for you!

Delimited Text Ingest Fails on Unescaped Quotes

marklogic/marklogic-contentpump

Issue

When importing delimited text MLCP attempts to skip ill-formatted records with unescaped quotes.

MLCP skips a poorly-formatted three-column row like the following: "cell 2 1","cell "2" 2","cell 2 3"

but fails entirely on a poorly-formatted three-column row like the following: "cell 3 1","cell "3", "2",","cell 3 3"

with the error: ERROR contentpump.ContentPump: Error running a ContentPump job java.lang.RuntimeException: java.io.IOException: (line 5) invalid char between encapsulated token and delimiter

When ingesting the following file I would expect records 1, 4, and 5 to be ingested, and records 2 and 3 to be skipped: column1,column2,column3 "cell 1 1","cell 1 2","cell 1 3" "cell 2 1","cell "2" 2","cell 2 3" "cell 3 1","cell "3", "2",","cell 3 3" "cell 4 1","cell 4 2","cell 4 3" "cell 5 1","cell 5 2","cell 5 3" however mlcp throws a fatal error when ingesting record 3. Here is a list of the documents ingested: image. Only the first record was ingested. The second record was skipped. The job failed on the third record. Records 4 and 5 were not ingested.

Materials

A stack trace, an example csv, and a config file are provided in the attached content issue-report.zip. A thread count of 1 is intentional in order to show the stack trace in stdout.

Environment Details

MarkLogic Server Version: 9.0-2 ContentPump version: 9.0.2 Java version: 1.8.0_152

Updated 29/11/2017 22:59 3 Comments

BiTemporal c_testOther fails after upgrade from ML server build 8.0.7.1 to 9.0.4

marklogic/java-client-api

While running the test on a system that was upgraded from MarkLogic 8.0.7.1 to 9.0.4 nightly build this test fails. The test was run from Java Client API repo checked out as 3.0.7.

Client API jar version: 3.0.7 ML Server version: 9.0.4

Command run: mvn test

Local message: search failed: Bad Request. Server Message: TEMPORAL-GTLSQT: cts:search(fn:collection(), cts:and-query((cts:or-query((cts:word-query("temporalDoc", ("lang=en"), 1), cts:word-query("temporalBulkDoc", ("lang=en"), 1)), ()), cts:lsqt-query("temporal-collection", 2017-11-07T20:50:35.795Z, (), 1)), ()), ("unfiltered", cts:score-order("descending")), xs:double("0"), ()) -- Timestamp 2017-11-07T20:50:35.795Z provided is greater than LSQT 2017-11-07T20:50:35.076415Z, cannot perform current-query to provide stable result, please provide a timestamp before LSQT

com.marklogic.client.FailedRequestException: Local message: search failed: Bad Request. Server Message: TEMPORAL-GTLSQT: cts:search(fn:collection(), cts:and-query((cts:or-query((cts:word-query("temporalDoc", ("lang=en"), 1), cts:word-query("temporalBulkDoc", ("lang=en"), 1)), ()), cts:lsqt-query("temporal-collection", 2017-11-07T20:50:35.795Z, (), 1)), ()), ("unfiltered", cts:score-order("descending")), xs:double("0"), ()) -- Timestamp 2017-11-07T20:50:35.795Z provided is greater than LSQT 2017-11-07T20:50:35.076415Z, cannot perform current-query to provide stable result, please provide a timestamp before LSQT
at com.marklogic.client.impl.JerseyServices$JerseySearchRequest.getResponse(JerseyServices.java:2292)
at com.marklogic.client.impl.JerseyServices.getBulkDocumentsImpl(JerseyServices.java:912)
at com.marklogic.client.impl.JerseyServices.getBulkDocuments(JerseyServices.java:788)
at com.marklogic.client.impl.DocumentManagerImpl.search(DocumentManagerImpl.java:500)
at com.marklogic.client.impl.DocumentManagerImpl.search(DocumentManagerImpl.java:462)
at com.marklogic.client.test.BitemporalTest.c_testOther(BitemporalTest.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75
Updated 08/11/2017 23:34

create site fails when running ubos in nspawn container

uboslinux/ubos-admin

I’m trying the new Beta 12 images. Forgive me if they are not yet ready for consumption.

After booting ubos in a container on Arch on either x86_64 PC or EspressoBIN I get an error when attempting to deploy any site with “ubos-admin createsite”. I get a long list of these errors:

`…

cp: failed to clone ‘/srv/http/sites/s39babdd3620d32167bc2de6c5dbaf75ab08313fb/selfoss/public/win8-71-icon.png’ from ‘/usr/share/selfoss/selfoss/public/win8-71-icon.png’: Operation not supported

ERROR: Createsite failed.`

Updated 04/11/2017 01:23 4 Comments

Better error message

uboslinux/ubos-admin
% ubos-admin showappconfig --host temp2 --context /sau
ERROR: Cannot find an appconfiguration at context path /sau

This should also say “for host temp2” and perhaps “There are N sites on this device”.

Updated 02/12/2017 01:48

createsite -n as non-root enters cycle when package needs to be downloaded

uboslinux/ubos-admin
% ubos-admin createsite -o /tmp/foo -n
** First a few questions about the website that you are about to create:
Hostname (or * for any): hhhh
Site admin user id (e.g. admin): admin
Site admin user name (e.g. John Doe): admin
Site admin user password (e.g. s3cr3t): 
Site admin user e-mail (e.g. foo@bar.com): test@ubos.net
** Now a few questions about the app(s) you are going to deploy to this site:
First app to run (or leave empty when no more apps): wollmilchsau
Downloading packages...
ERROR: Failed to install package(s). Pacman says: error: you cannot perform this operation unless you are root.
First app to run (or leave empty when no more apps):

Instead of keeping to ask for an app, it should exit out with an error message to re-run the command as root.

Updated 02/12/2017 01:45

Set BMC ipsrc dhcp failed using ipmitool

openbmc/openbmc

<cde:info> SW407355 </cde:info> We used ipmitool lan set 1 ipsrc dhcp and ipmitool lan set 1 access on to set BMC IP to DHCP. But the result as below:

[xCAT Genesis running on mid05tor12cn16 /]# ipmitool lan set 1 ipsrc dhcp
[xCAT Genesis running on mid05tor12cn16 /]# ipmitool lan set 1 access on
IPMI command failed: Command response could not be provided
Unable to Set Channel Access(volatile) for channel 1
[xCAT Genesis running on mid05tor12cn16 /]# ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : MD5
Auth Type Enable        : Callback : MD5                        
: User     : MD5                       
: Operator : MD5                        
: Admin    : MD5                        
: OEM      : MD5IP 
Address Source       : Static Address
IP Address              : 0.0.0.0
Subnet Mask             : 0.0.0.0
MAC Address             : 70:e2:84:14:30:bf
Default Gateway IP      : 0.0.0.0
802.1q VLAN ID          : Disabled
Cipher Suite Priv Max   : Not Available
Bad Password Threshold  : Not Available

I ever tried to reboot BMC, but it’s still “Static Address”.

@whowutwut @zet809

Updated 14/12/2017 15:36 11 Comments

Taligen is eating my observations!

taligen/taliwodo

Here’s the task list: a: Using the private ssh key that goes with the test staff, ssh to the device under test as user shepherd o: After no more than 4 minutes, successfully log into the device under test a: On the device under test, repeatedly `systemctl is-system-running` o: After no more than 4 minutes, reports `running` a: On the device under test, `cat /etc/pacman.d/repositories.d/*` o: Shows os, hl and tools with a \$channel variable pointing to depot.ubos.net a: On the device under test, `cat /etc/pacman.conf` o: Below the line, shows os, hl and tools with correct channel $channel Here is what taliwodo outputs: Using the private ssh key that goes with the test staff, ssh to the device under test as user shepherd On the device under test, repeatedly systemctl is-system-running On the device under test, cat /etc/pacman.d/repositories.d/* On the device under test, cat /etc/pacman.conf

Updated 16/10/2017 20:41

Escape <> in taligen ``

taligen/taligen

I have been using <IP> to denote a particular IP address in a script. It only occurs inside backtick'ed blocks. Can we treat everything inside backticks as “verbatim” and escape it properly so it doesn’t get interpreted as HTML.

Updated 28/11/2017 01:55

Try not to parse Blog when child apps are accesed

nikhgupta/middleman-apps

Seems like all of the blog is being accessed at the moment when child apps are accessed. Since we are referring to MM config before sending out the response. This causes delay in response. If possible, we should remove calls to MM config.

:image_optim is deprecated. Please use `:imageoptim` instead.
== Blog Sources: posts/{year}-{month}-{day}-{title}.html (:prefix + :sources)
Puma starting in single mode...
* Version 3.10.0 (ruby 2.4.0-p0), codename: Russell's Teapot
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:9292
Use Ctrl-C to stop
== Blog Sources: posts/{year}-{month}-{day}-{title}.html (:prefix + :sources)
== Blog Sources: posts/{year}-{month}-{day}-{title}.html (:prefix + :sources)
Updated 14/10/2017 10:14

Weird issue while performing search on nested resource controller

andersao/l5-repository

The issue which i’m facing is really weird and could not find any case for solving this. For example I have Country entity which have one-to-many relationship with City entity. And i’m creating nested resource route and controller for the Country like so Router php Route::resource('countries.cities', 'CountryCityController'); Controller php /** * Listing all cities under given country * @param int $countryID */ public function index($countryID) { // verify the existence of the country $country = $this->countries->find($countryID); // fetch all the city under given country $cities = $this->cities->scopeQuery(function ($query) use ($country) { $query->where('country_id', $country->id); })->all(); // return final results return $cities; } So while I want to search for a city in the results set the url with parameter will be https://app.dev/api/countries/1/cities?search=a&searchFields=name:like There will be an sql query performed like so sql select * from `countries` where (`cities`.`name` like '%a%') and `countries`.`id` = '1' limit 1 But the weird here is while performing search only string typed as a is well performed but any other characters will not for example the b character https://app.dev/api/countries/1/cities?search=b&searchFields=name:like The sql query sql select * from `countries` where (`countries`.`name` like '%b%') and `countries`.`id` = '1' limit 1 I have tried with my local development machine and the stagging server use php7.1 and mysql5.7 but it procedure as same, so it seem there is not hardware problem

Updated 13/12/2017 13:43 10 Comments

UBOS 404 page should have a "go to top of site" link

uboslinux/ubos-admin

If I go to http://example.com/foo/bar and that results in a 404, chances are that I’d like to go to http://example.com/ next. Currently we don’t have a link there. From a UBOS perspective, we could also distinguish between 404’s that are 1) site does not exist, 2) app does not exist, 3) page within app does not exist.

Updated 02/12/2017 01:20

On x86_64, move to UEFI boot

uboslinux/ubos-admin

See https://wiki.archlinux.org/index.php/EFI_System_Partition and http://www.tomshardware.com/faq/id-1860905/install-arch-linux-uefi.html and https://www.tecmint.com/arch-linux-installation-and-configuration-guide/

The money quote seems to be:

# pacman -S grub efibootmgr dosfstools os-prober mtools
# mkdir /boot/EFI
# mount /dev/sda1 /boot/EFI  #Mount FAT32 EFI partition 
# grub-install --target=x86_64-efi  --bootloader-id=grub_uefi --recheck
Updated 02/12/2017 01:20 1 Comments

Selected radio buttons do not reappear

taligen/taliwodo
  1. Create a workdown
  2. Select a few Pass and Fail buttons
  3. Hit refresh: O: The button selections remain (Pass) A: Close browser window A: Go to overview page, select wodo page O: The button selections remain (FAIL – there are none)
Updated 03/10/2017 17:45 1 Comments

Incomprehensible error message

taligen/taligen
% taligen all-release-ubos.tlt 
Traceback (most recent call last):
  File "/usr/bin/taligen", line 315, in <module>
    main()
  File "/usr/bin/taligen", line 306, in main
    script = collect_pass(args)
  File "/usr/bin/taligen", line 252, in collect_pass
    script["steps"] = read_through_file(".", args.tl_file, script["parameters"], {}, deque())
  File "/usr/bin/taligen", line 209, in read_through_file
    call_file = call_file_match.group(1) + ".tl"
AttributeError: 'NoneType' object has no attribute 'group'
Updated 07/10/2017 00:16 1 Comments

Show status info of workdowns in overview page

taligen/taliwodo

It should probably indicate:

  • has at least one task been worked on
  • have all tasks been worked on
  • is there at least one task that passed
  • is there at least one task that failed

Maybe some icons, or a rotated “thermometer” which shows in green the percentage of passed tasks, in red those that failed, in gray those that were marked as not done, and the rest (white) that have no status.

Updated 06/10/2017 03:47

Clean up header

taligen/taliwodo
TL name: release-ubos.tl
Generated: 2017/09/27 03-37-47
Workdown Created: 2017/09/27 03-55-50
Parameters: 
  • Create a table
  • Shoud look far less prominent (smaller font, maybe font color, maybe moved to the right)
  • Don’t print “Parameters” if there were none
Updated 02/10/2017 22:33

Actions on subsequent lines get merged

taligen/taligen

If I don’t have a blank line between subsequent actions in my .tl file, like this: ``` a: one a: two

a: three ` I get two actions, not three:oneandtwoget merged. Merging should only happen if the next line is a continuation (no leadinga:``, starts with leading white space)

Updated 06/10/2017 23:02

XCC performance compared to DMSDK performance during bulk ingest

marklogic/java-client-api

We have a Spring Batch-based data migration program that reads data from Oracle RDB and writes it to MarkLogic. We have a 3-node ML cluster that’s now on 9.0-1.1, was on 8.0-6.3 before.

We’ve been using XCC and a custom “pooling” approach where we create an XCC ContentSource for each host. Each batch of documents to be written to ML is then handed off to a ContentSource in round robin fashion. A new Session is then created from the ContentSource, and then session.insertContent is called with an array of Content objects. Very simple, nothing fancy. We use a ContentCreateOptions object for each document, but all we do is set the format to XML, set the collections and permissions, and set the repair level to FULL.

We now have DMSDK support in the migration tool, alongside the XCC support (which one is used is determined by a command line argument). Our DMSDK code is very simple too, basically this:

    databaseClient = DatabaseClientFactory.newClient(host, port, user, password, DatabaseClientFactory.Authentication.BASIC);
    dataMovementManager = databaseClient.newDataMovementManager();
    writeBatcher = dataMovementManager.newWriteBatcher().withBatchSize(batchSize).withThreadCount(threadCount);
    jobTicket = dataMovementManager.startJob(writeBatcher);

When the migration program gets a batch of documents to write, it then just calls this for each document in the batch:

    writeBatcher.add(doc.getUri(), doc.getMetadata(), doc.getContent());

Once all the batches are written, we have the following cleanup code:

    writeBatcher.flushAndWait();
    dataMovementManager.stopJob(jobTicket);
    dataMovementManager.release();
    databaseClient.release();

Functionally, everything works fine, but we’re consistently getting better results with our custom XCC approach. Details on the migration that we’re testing with:

  1. The migration inserts 2,948,131 documents
  2. Each document is small - just 7 elements, with each element value having less than 100 characters

Details on our 3-node cluster - each node has the same specs - 48g memory; 24 X5660 cpus at 2.80ghz; and disk storage is 500gb, with plenty of space (we’re testing against an empty database). The migration program is being run on a separate machine, with 145g memory; 24 x5675 cpus at 3.07ghz; and 500gb storage.

Here are the 4 test runs I did, all with a thread count of 64:

Library Batch Size Total Time (ms) % of DMSDK
XCC 100 339,899 76%
XCC 200 343,193 77%
DMSDK 100 453,655 102%
DMSDK 200 444,564 100%

I’m going to do a few more runs, but these are consistent with all the other runs I’ve done.

I’ve included an export of Monitoring History during the time frame where I did the above 4 runs (they were done in that order too). Interesting notes about what’s in there:

  1. CPU is significantly higher during the DMSDK runs - around 50% compared to 25%
  2. There are lots of ETC hits during the DMSDK runs, but none during the XCC runs. This confuses me.
  3. There are lots more list cache hits during the DMSDK runs, which I figure is for the same reason as the ETC hits (there are plenty of duplicate values across the 2 million plus documents).

xcc-vs-dmsdk-overview-20170718-120732.xlsx

Updated 18/11/2017 00:23 35 Comments

Adding avg, count, max, min

andersao/l5-repository

There are those methods in laravel, is there any plan to add them to the package?

For ex: ``` public function count() {

    $this->applyCriteria();
    $this->applyScope();

    $result = $this->model->count();

    $this->resetModel();
    $this->resetScope();

    return $result;

}

```

Updated 29/10/2017 14:11 4 Comments

Final touches on SDK for Release Candidate 1

RestComm/restcomm-ios-sdk

I quickly copied this from Android SDK, so many of them will have to change:

Review all aspects of the SDK and make sure it is GA quality. Some things to check: - API is in good shape - CI/CD facilities are complete and 100% functional from Travis CI - UI/Integration/Unit testing are complete with 100% passing tests, also automated testing in real devices (using external service like Amazon farm) would be great. - Interoperability testing between all SDKs would be a plus, but not sure if it can be realized yet, as the rest of the SDKs might not yet be ready. - Documentation is up to date and with some improvements so that it is easier to read (also all documentation should reside in this repo, not Restcomm-Connect): - Reference Documentation - Quick start guide - User guide for Olympus - Olympus App and Hello World sample app both functional. Olympus should be verified by UI tests, but not sure about Hello World -maybe we could introduce a rudimentary set of UI tests for this as well. - Libraries in RC should all be release type and as lightweight as possible - All dependencies are stored in Sonatype and visible to public. The repository should have no local dependencies.

Also do a round of very thorough testing: - Do some more testing on Notifications functionality + integrations with Android Contacts + Calls as they aren’t tested enough as far as I know - Test UI/UX aspects to fix any left overs that might have slipped our attention. - Manually test interoperability in various types of calls within Android Olympus: - Video -> Video - Video -> Audio - Audio -> Video - Audio -> Audio - Manually test interoperability between Android, iOS and Web Olympus

Updated 26/09/2017 08:02

Loading document fails when used with a MetaData object with property set

marklogic/java-client-api

Loading document fails when used with a MetaData object with property set. If “.withProperty("docMeta-1”, “true”).withQuality(1)“ is removed from DocumentMetadataHandle object, the documents are written fine.

    @Test
    public void addWithMetadata() throws Exception{

        final String query1 = "fn:count(fn:doc())";

        try{
            DocumentMetadataHandle meta6 = new DocumentMetadataHandle()
                     .withCollections("Sample Collection 1").withProperty("docMeta-1", "true").withQuality(1);
            meta6.setFormat(Format.XML);
            Assert.assertTrue(dbClient.newServerEval().xquery(query1).eval().next().getNumber().intValue() == 0);

            Thread.currentThread().sleep(5000L);

            DatabaseClient dbClient = DatabaseClientFactory.newClient(host, port, user, password, Authentication.DIGEST);
            DataMovementManager dmManager = dbClient.newDataMovementManager();

            WriteBatcher ihb2 =  dmManager.newWriteBatcher();
            ihb2.withBatchSize(50).withThreadCount(1);

            ihb2.onBatchSuccess(
                    batch -> {
                        }
                    )
                    .onBatchFailure(
                      (batch, throwable) -> {
                          throwable.printStackTrace();

                      }
            );
            for (int j =0 ;j < 1000; j++){
                String uri ="/local/string-"+ j;
                ihb2.addAs(uri , meta6,jsonNode);
            }


            ihb2.flushAndWait();

            Assert.assertTrue(dbClient.newServerEval().xquery(query1).eval().next().getNumber().intValue() == 1000);

        }
        catch(Exception e){
            e.printStackTrace();
        }
    }

Log:



16:32:32.839 [main] DEBUG c.m.client.impl.JerseyServices - Connecting to localhost at 8000 as admin
16:32:33.535 [main] DEBUG c.m.client.impl.JerseyServices - Getting forestinfo as application/json
16:32:33.878 [main] DEBUG c.m.client.impl.JerseyServices - Posting eval
16:32:39.001 [main] DEBUG c.m.client.impl.JerseyServices - Connecting to localhost at 8000 as admin
16:32:39.251 [main] DEBUG c.m.client.impl.JerseyServices - Getting forestinfo as application/json
16:32:39.278 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [localhost] hosts with forests for "WriteHostBatcher"
16:32:39.283 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "localhost" to the rotation
16:32:39.325 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - threadCount=1
16:32:39.325 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - batchSize=50
16:32:39.412 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:39.413 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:39.419 [main] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:39.420 [main] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:43.731 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.731 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:43.733 [main] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.734 [main] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
16:32:43.746 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:43.748 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.748 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:43.756 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:43.758 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.758 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:43.767 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:43.769 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.770 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:43.783 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:43.785 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:43.786 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:44.198 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.199 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:44.753 [main] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
    at com.marklogic.client.impl.JerseyServices.checkStatus(JerseyServices.java:4243)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3257)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2022)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.add(WriteBatcherImpl.java:292)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.addAs(WriteBatcherImpl.java:320)
    at com.marklogic.client.datamovement.functionaltests.WriteHostBatcherTest.addWithMetadata(WriteHostBatcherTest.java:2458)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
16:32:44.756 [main] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.756 [main] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:44.768 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.768 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
16:32:44.852 [main] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
16:32:44.854 [main] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.854 [main] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
    at com.marklogic.client.impl.JerseyServices.checkStatus(JerseyServices.java:4243)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3257)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2022)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.add(WriteBatcherImpl.java:292)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.addAs(WriteBatcherImpl.java:320)
    at com.marklogic.client.datamovement.functionaltests.WriteHostBatcherTest.addWithMetadata(WriteHostBatcherTest.java:2458)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
    at com.marklogic.client.impl.JerseyServices.checkStatus(JerseyServices.java:4243)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3257)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
16:32:44.859 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
16:32:44.860 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.860 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy.rejectedExecution(ThreadPoolExecutor.java:2022)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1369)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.add(WriteBatcherImpl.java:292)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.addAs(WriteBatcherImpl.java:320)
    at com.marklogic.client.datamovement.functionaltests.WriteHostBatcherTest.addWithMetadata(WriteHostBatcherTest.java:2458)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 50 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 74 more
16:32:44.887 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:44.888 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.888 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:44.899 [main] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:44.900 [main] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.901 [main] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:44.936 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
16:32:44.937 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:44.937 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:45.127 [main] INFO  c.m.c.d.impl.WriteBatcherImpl - flushing 0 queued docs
16:32:45.129 [pool-3-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:45.130 [pool-3-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:45.160 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:45.160 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:539)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.lambda$5(WriteBatcherImpl.java:658)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 22 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 46 more
16:32:45.169 [pool-3-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
16:32:45.170 [pool-3-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:45.170 [pool-3-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to output non-whitespace characters outside main element tree (in prolog or epilog)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to output non-whitespace characters outside main element tree (in prolog or epilog)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to output non-whitespace characters outside main element tree (in prolog or epilog)
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1593)
    at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:420)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:902)
    ... 43 more
com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:184)
    at com.marklogic.client.impl.DigestChallengeFilter.handle(DigestChallengeFilter.java:34)
    at com.sun.jersey.api.client.filter.HTTPDigestAuthFilter.handle(HTTPDigestAuthFilter.java:493)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:568)
    at com.marklogic.client.impl.JerseyServices.doPost(JerseyServices.java:3940)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3227)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:904)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:270)
    at com.marklogic.client.impl.ValueConverter.convertFromJava(ValueConverter.java:87)
    at com.marklogic.client.io.DocumentMetadataHandle.sendPropertiesImpl(DocumentMetadataHandle.java:873)
    at com.marklogic.client.io.DocumentMetadataHandle.sendMetadataImpl(DocumentMetadataHandle.java:776)
    at com.marklogic.client.io.DocumentMetadataHandle.write(DocumentMetadataHandle.java:559)
    at com.marklogic.client.impl.StreamingOutputImpl.write(StreamingOutputImpl.java:48)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
    at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:218)
    at com.sun.jersey.multipart.impl.MultiPartWriter.writeTo(MultiPartWriter.java:71)
    at com.sun.jersey.api.client.RequestWriter$RequestEntityWriterImpl.writeRequestEntity(RequestWriter.java:231)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler$2.writeTo(ApacheHttpClient4Handler.java:262)
    at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:96)
    at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
    at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:120)
    at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:263)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.sendRequestEntity(AbstractClientConnAdapter.java:227)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:255)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:776)
    at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:170)
    ... 19 more
Caused by: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
    at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1564)
    at com.ctc.wstx.sw.RepairingNsStreamWriter.writeAttribute(RepairingNsStreamWriter.java:124)
    at com.marklogic.client.io.DocumentMetadataHandle$ValueSerializer.process(DocumentMetadataHandle.java:900)
    ... 43 more
16:32:45.178 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to output non-whitespace characters outside main element tree (in prolog or epilog)
16:32:45.179 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Posting documents
16:32:45.180 [pool-1-thread-1] DEBUG c.m.client.impl.JerseyServices - Sending multipart for /v1/documents
16:32:45.183 [pool-1-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.sun.jersey.api.client.ClientHandlerException: com.marklogic.client.MarkLogicIOException: javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
    at com.marklogic.client.impl.JerseyServices.checkStatus(JerseyServices.java:4243)
    at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3257)
    at com.marklogic.client.impl.JerseyServices.postBulkDocuments(JerseyServices.java:3345)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:619)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.impl.DocumentManagerImpl.write(DocumentManagerImpl.java:611)
    at com.marklogic.client.impl.GenericDocumentImpl.write(GenericDocumentImpl.java:1)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl$BatchWriter.run(WriteBatcherImpl.java:1032)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.marklogic.client.datamovement.impl.WriteBatcherImpl.lambda$5(WriteBatcherImpl.java:658)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
16:32:45.223 [pool-3-thread-1] WARN  c.m.c.d.impl.WriteBatcherImpl - Error writing batch: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-DOCSTARTTAGCHAR: xdmp:get-request-part-body("xml") -- Unexpected character "&quot;" in start tag at  line 1
16:32:45.224 [main] DEBUG c.m.client.impl.JerseyServices - Posting eval
S is true
WriteHostBatcher-1
Updated 02/11/2017 22:27 7 Comments

Process hang with QueryBatcher during forest failover

marklogic/java-client-api
  1. The following test is performed on 3 node cluster with a db associated with 3 forests. 18:07:20.277 [main] INFO c.m.c.d.impl.WriteBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "ApplyTransform" 18:07:20.807 [main] INFO c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-5.marklogic.com" to the rotation 18:07:20.807 [main] DEBUG c.m.client.impl.JerseyServices - Connecting to rh7v-intel64-90-test-6.marklogic.com at 8000 as admin 18:07:21.166 [main] INFO c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-6.marklogic.com" to the rotation 18:07:21.166 [main] INFO c.m.c.d.impl.WriteBatcherImpl - Adding DatabaseClient on port 8000 for host "rh7v-intel64-90-test-4.marklogic.com" to the rotation
  2. When transformation is taking place, one of the host “rh7v-intel64-90-test-6.marklogic.com” is stopped 21:40:26.896 [pool-1-thread-1] ERROR c.m.c.d.HostAvailabilityListener - ERROR: host unavailable "rh7v-intel64-90-test-6.smarklogic.com", black-listing it for PT50S Server Error log:
2016-11-27 18:10:24.170 Info: Stopping XDQPServerConnection, client=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:7999-172.18.132.42:4380
  1. Before Forest failover occurs (which takes place in 30 seconds after node shutdown) , node “rh7v-intel64-90-test-6.marklogic.com” is restarted.

Error Log: 2016-11-27 18:10:38.135 Info: Starting XDQPClientConnection, server=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:38312-172.18.132.42:7999 2016-11-27 18:10:38.138 Info: Starting XDQPClientConnection, server=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:38314-172.18.132.42:7999 2016-11-27 18:10:38.139 Debug: Retrying AppRequestTask::handleEvalLocked apply-transform.xqy 4333219226342543433 Update 11 because XDMP-XDQPDISC: XDQP connection disconnected, server=rh7v-intel64-90-test-6.marklogic.com 2016-11-27 18:10:38.142 Info: Starting domestic XDQPServerConnection, client=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:7999-172.18.132.42:4388 2016-11-27 18:10:42.942 Info: Mounted forest ApplyTransform-3 remotely on rh7v-intel64-90-test-6.marklogic.com 2016-11-27 18:10:45.494 Info: Database ApplyTransform is online with 3 forests D. After 15 seconds, elapse, the following message is seen in the client log.

18:10:44.378 [pool-3-thread-1] INFO  c.m.c.d.HostAvailabilityListener - it's been PT15S since host rh7v-intel64-90-test-6.marklogic.com failed, opening communication to all server hosts [[rh7v-intel64-90-test-4.marklogic.com, rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-6.marklogic.com]]
18:10:44.378 [pool-3-thread-1] INFO  c.m.c.d.impl.QueryBatcherImpl - (withForestConfig) Using [rh7v-intel64-90-test-5.marklogic.com, rh7v-intel64-90-test-6.marklogic.com, rh7v-intel64-90-test-4.marklogic.com] hosts with forests for "ApplyTransform"
  1. Server is stopped again and now forest failover takes place Error log: 2016-11-27 18:10:48.319 Info: Stopping XDQPServerConnection, client=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:7999-172.18.132.42:4398, requests=0, recvTics=0, sendTics=1, recvs=566, sends=517, recvBytes=87352, sendBytes=204140 2016-11-27 18:11:19.971 Info: Database ApplyTransform is offline 2016-11-27 18:11:19.974 Info: Unmounted forest ApplyTransform-3 because disconnected host 2016-11-27 18:11:19.982 Notice: Failing over forest ApplyTransform-3 because the host rh7v-intel64-90-test-6.marklogic.com has gone offline 2016-11-27 18:11:19.985 Info: Forest ApplyTransform-3 state changed from unmounted to mounted 2016-11-27 18:11:20.112 Info: Forest ApplyTransform-3 state changed from mounted to recovering 2016-11-27 18:11:20.118 Info: Forest ApplyTransform-3 state changed from recovering to open

  2. The client process has been hanging since 18:11:27.207 . The server was started later Error log: 2016-11-27 18:11:31.532 Info: Starting domestic XDQPServerConnection, client=rh7v-intel64-90-test-6.marklogic.com, conn=172.18.132.40:7999-172.18.132.42:4400

The entire client, server log file as well as stack trace taken at two different times are attached. exception.txt errorlog.txt jstack.txt jstack1.txt

I am guessing a similar scenario could occur with WriteBatcher as well during failover.

Test:

@Test
    public void xQueryMasstransformReplace() throws Exception{

        WriteBatcher ihb2 =  dmManager.newWriteBatcher();
        ihb2.withBatchSize(27).withThreadCount(10);
        ihb2.onBatchSuccess(
                batch -> {


                }
                )
        .onBatchFailure(
                (batch, throwable) -> {
                    throwable.printStackTrace();
                });

        dmManager.startJob(ihb2);

        for (int j =0 ;j < 2000; j++){
            String uri ="/local/string-"+ j;
            ihb2.add(uri, meta2, stringHandle);
        }

        ihb2.flushAndWait();

        ServerTransform transform = new ServerTransform("add-attr-xquery-transform");
        transform.put("name", "Lang");
        transform.put("value", "English");

        AtomicInteger skipped = new AtomicInteger(0);
        AtomicInteger success = new AtomicInteger(0);
        AtomicInteger failure = new AtomicInteger(0);

        ApplyTransformListener listener = new ApplyTransformListener()
                .withTransform(transform)
                .withApplyResult(ApplyResult.REPLACE)
                .onSuccess(batch -> {
                    success.addAndGet(batch.getItems().length);
                }). 
                onBatchFailure((batch, throwable) -> {
                    failure.addAndGet(batch.getItems().length);
                    throwable.printStackTrace();
                }).onSkipped(batch -> {
                    skipped.addAndGet(batch.getItems().length);

                });

        QueryBatcher batcher = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("XmlTransform"))
                .onUrisReady(listener).withBatchSize(7);
        batcher.setQueryFailureListeners(
                  new HostAvailabilityListener(dmManager)
                    .withSuspendTimeForHostUnavailable(Duration.ofSeconds(15))
                    .withMinHosts(2)
                );  
        JobTicket ticket = dmManager.startJob( batcher );
        batcher.awaitCompletion();
        dmManager.stopJob(ticket);
        System.out.println("Success "+ success.intValue());
        System.out.println("Failure "+failure.intValue());
        String uris[] = new String[2000];
        for(int i =0;i<2000;i++){
            uris[i] = "/local/string-"+ i;
        }
        int count=0;
        DocumentPage page = dbClient.newDocumentManager().read(uris);
        DOMHandle dh = new DOMHandle();
        while(page.hasNext()){
            DocumentRecord rec = page.next();
            rec.getContent(dh);
            assertTrue("Element has attribure ? :",dh.get().getElementsByTagName("foo").item(0).hasAttributes());
            assertEquals("Attribute value should be English","English",dh.get().getElementsByTagName("foo").item(0).getAttributes().item(0).getNodeValue());
            count++;
        }

        assertEquals("document count", 2000,count); 
        assertEquals("document count", 2000,success.intValue()); 
        assertEquals("document count", 0,skipped.intValue()); 
    }
Updated 02/11/2017 22:13 10 Comments

When message arrives when inside a call the call is hung up and the remote party remains in the call

RestComm/restcomm-android-sdk

Let’s first describe all the issues: 1. When text message arrives when inside a call the call is hung up and the remote party remains in the call 2. When inside an incoming call the back button is pressed, the call is hung up locally, but the remote party remains in the call (the same thing for outgoing calls works correctly)

Analysis: The main issue here, apart from the inconsistency of signaling, is that the only way to leave the Activity of the active call without shutting it down is to navigate outside the App. For more background please refer to #380

Updated 26/09/2017 08:04 1 Comments

Refactor iOS SDK part I

RestComm/restcomm-ios-sdk

Let’s document the steps for the first iteration of refactoring (let’s add as we think better about that): - [ ] Allow the stack to be restarted when the user changes from TLS to non-TLS for signaling. This will allow to properly address https://github.com/RestComm/restcomm-ios-sdk/issues/476 - [ ] Don’t forget, after refactoring is done, to re-enable the functionality that allow to modify TLS preference

Updated 26/09/2017 08:02 1 Comments

Error message for OPTIC-INVALARGS needs to be formatted correctly

marklogic/java-client-api

For a test that checks error messages when limit value is less than a positive value, the error message shows the limit variable name; prints the variable name (“length”) and the message twice.

For the above test in Java (given below):

Map<String, Object>[] literals1 = new HashMap[5];
Map<String, Object>[] literals2 = new HashMap[4];
...
...
Map<String, Object> row = new HashMap<>();          
row.put("rowId", 1); row.put("colorId", 1); row.put("desc", "ball");
literals1[0] = row; 
row = new HashMap<>();
row.put("rowId", 2); row.put("colorId", 2); row.put("desc", "square");
literals1[1] = row;
row = new HashMap<>();
row.put("rowId", 3); row.put("colorId", 1); row.put("desc", "box");
literals1[2] = row;        
row = new HashMap<>();
row.put("rowId", 4); row.put("colorId", 1); row.put("desc", "hoop");
literals1[3] = row;
row = new HashMap<>();
row.put("rowId", 5); row.put("colorId", 5); row.put("desc", "circle");
literals1[4] = row;             

row = new HashMap<>();          
row.put("colorId", 1); row.put("colorDesc", "red");
literals2[0] = row;
row = new HashMap<>();
row.put("colorId", 2); row.put("colorDesc", "blue");
literals2[1] = row;   
row = new HashMap<>();
row.put("colorId", 3); row.put("colorDesc", "black");
literals2[2] = row;        
row = new HashMap<>();
row.put("colorId", 4); row.put("colorDesc", "yellow");
literals2[3] = row;
...
// Create a new Plan.
RowManager rowMgr = client.newRowManager();
PlanBuilder p = rowMgr.newPlanBuilder();

// plans from literals
ModifyPlan plan1 = p.fromLiterals(literals1);
ModifyPlan plan2 = p.fromLiterals(literals2);
...
...
//limit with 0 length
ModifyPlan outputLimit = plan1.joinInner(plan2)
                                      .where(p.eq(p.col("colorId"), p.xs.intVal(1)))
                                      .limit(0)
                                      .select("rowId", "desc", "colorId", "colorDesc");
JacksonHandle jacksonHandle = new JacksonHandle();
jacksonHandle.setMimetype("application/json");
StringBuilder str = new StringBuilder();
try {
            rowMgr.resultDoc(outputLimit, jacksonHandle);
   }
catch(Exception ex) {
        str.append(ex.getMessage());
    }

The message is:

com.marklogic.client.FailedRequestException: Local message: failed to apply resource at rows: Bad Request. Server Message: OPTIC-INVALARGS: fn.error(null, 'OPTIC-INVALARGS', 'limit must be a positive number: '+length); -- Invalid arguments: limit must be a positive number: 0

The following text needs to be removed.

limit must be a positive number: '+length
Updated 26/10/2017 17:30 5 Comments

Error "DFU_DNLOAD" while upgrading with avrdude

emsec/ChameleonMini

Hi, When i try to execute the upgrade i get the following message:

zgv@ZGV-MacBookPro:~/Desktop/upgrade$ sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9746 (probably x128a4u) avrdude: NOTE: “application” memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file “Chameleon-Mini.hex” avrdude: writing application (131072 bytes):

Writing | # | 2% 0.05savrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory page 0x0000 avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash) failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash)
__failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash)
failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash) *
failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash) __failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to set memory unit 0x00 (Flash)
failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to write 0x0001 bytes at 0x0007 *
failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to write 0x0001 bytes at 0x001E __failed;
avrdude: Error: DFU_DNLOAD failed: error sending control message: Broken pipe avrdude: Error: Failed to write 0x0001 bytes at 0x003E
*failed;
^C zgv@ZGV-MacBookPro:~/Desktop/upgrade$

Dose any one have an idea why?

Updated 10/11/2017 08:26 48 Comments

Retrieve search results in a JSON format

marklogic/java-client-api

As a developer I want to TITLE So that I can process JSON search results instead of XML

I am applying a transform to search results from the /v1/search endpoint. Using a ServerTransform class. I want to store the search results in a JacksonHandle.

JacksonHandle results = queryMgr.search(querydef, new JacksonHandle());

But I’m getting an XQuery error returned. Below is the XQuery transform that transforms search results to JSON.

xquery version "1.0-ml";

module namespace transform = "http://marklogic.com/rest-api/transform/json-search";

import module namespace json = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy";

declare namespace search = "http://marklogic.com/appservices/search";

declare function transform(
        $context as map:map,
        $params as map:map,
        $content as document-node()
) as document-node()
{
    let $c := json:config("custom") ,
        $cx := map:put( $c, "whitespace", "ignore" ),
        $cx := map:put( $c, "text-value", "label" ),
        $cx := map:put( $c, "camel-case", fn:true() ),
        $cx := map:put( $c, "json-attributes", ("snippet-format", "total", "start", "page-length")),
        $cx := map:put( $c, "array-element-names", (xs:QName("search:result")))
    let $_ := map:put($context, "output-type", "text/json")
    let $json := json:transform-to-json(  $content ,$c )
    return $json
};
Updated 30/11/2017 16:05 5 Comments

repository create method with validator fails

andersao/l5-repository

I have the following code in my controller which fails when doing the create from the repository even though the manual validator passes and the FormRequest passes.

Controller.php

/**
     * Store a newly created resource in storage.
     *
     * @param  ReadingSessionCreateRequest $request
     *
     * @return \Illuminate\Http\Response
     */
    public function store(ReadingSessionCreateRequest $request)
    {

        try {
            $data = $request->all();
            $data['user_id'] = $this->user()->id;

            $readingSession = $this->repository->create($data);

            return $this->response->created(url('/readingSessions/'.$readingSession->id));
        } catch (ValidatorException $e) {

            throw new ResourceException('Could not create reading session.', $e->getMessageBag());
        }
    }

Validator.php

class ReadingSessionValidator extends LaravelValidator
{

    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
            'user_id' => 'required|exists:users,id',
            'reading_mode' => 'required|in:article,blink',
            'reading_speed' => 'required|integer|min:0',
            'time_spent' => 'required|integer|min:0',
        ],
        ValidatorInterface::RULE_UPDATE => [
            'user_id' => 'exists:users,id',
            'reading_mode' => 'in:article,blink',
            'reading_speed' => 'integer|min:0',
            'time_spent' => 'integer|min:0',
        ],
    ];
}

Request.php

class ReadingSessionCreateRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'reading_mode' => 'required|in:article,blink',
            'reading_speed' => 'required|integer|min:0',
            'time_spent' => 'required|integer|min:0',
        ];
    }
}

Here is the response I get

{
    "message": "Could not create reading session.",
    "errors": {
        "user_id": [
            "The user id field is required."
        ],
        "reading_mode": [
            "The reading mode field is required."
        ],
        "reading_speed": [
            "The reading speed field is required."
        ],
        "time_spent": [
            "The time spent field is required."
        ]
    },
    "status_code": 422
}

As you can see, it’s not even detecting the user_id attribute even though you can see it is manually being provided in the code.

Updated 28/10/2017 20:57

Secure SIP setting update will fail if RCDevice has been previously initialized without certificates

RestComm/restcomm-ios-sdk

That happens because right now we need a Sofia restart to use updated certificates and at the time we update SIP settings via [RCDevice updateParams] this doesn’t happen.

I can see the following ways to go here: - Restart Sofia if there’s a secure settings in the parms and Sofia wasn’t initialized with security (not that good) - See if we can update Sofia’s configuration via nua_set_params() to avoid restarting - Always require certificates to be passed by the App, no matter if they actual use secure signaling or not

Updated 26/09/2017 08:02 1 Comments

strange IO wait hangs

ipfs/go-ipfs

I killed my daemon recently and was browsing through the stack dump when i noticed a bunch of goroutines that looked roughly like this:

goroutine 15525749 [IO wait, 435 minutes]:
net.runtime_pollWait(0x7f4e4087cbf0, 0x72, 0xc82d4453bc)
    /home/whyrusleeping/go/src/runtime/netpoll.go:160 +0x60
net.(*pollDesc).Wait(0xc8259b6610, 0x72, 0x0, 0x0)
    /home/whyrusleeping/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8259b6610, 0x0, 0x0)
    /home/whyrusleeping/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8259b65b0, 0xc82d4453bc, 0x4, 0x4, 0x0, 0x7f4e40972050, 0xc82000e058)
    /home/whyrusleeping/go/src/net/fd_unix.go:250 +0x23a
net.(*conn).Read(0xc82075d3a0, 0xc82d4453bc, 0x4, 0x4, 0x0, 0x0, 0x0)
    /home/whyrusleeping/go/src/net/net.go:172 +0xe4
gx/ipfs/QmYp8PC6b9M3UY4awdHkdRUim68KpGSmRmz27bANHteen6/go-multiaddr-net.(*maConn).Read(0xc82a6ae450, 0xc82d4453bc, 0x4, 0x4, 0xc825105890, 0x0, 0x0)
    <autogenerated>:3 +0x82
gx/ipfs/QmboVACz6WES3byh3q8jdYPWL9TMz7CT89V34WPtruuRoS/go-libp2p-transport.(*connWrap).Read(0xc8330ee9a0, 0xc82d4453bc, 0x4, 0x4, 0xc8241b4c30, 0x0, 0x0)
    <autogenerated>:24 +0x82
github.com/ipfs/go-libp2p/p2p/metrics/conn.(*MeteredConn).Read(0xc8330eeaa0, 0xc82d4453bc, 0x4, 0x4, 0x0, 0x0, 0x0)
    /home/whyrusleeping/gopkg/src/github.com/ipfs/go-libp2p/p2p/metrics/conn/conn.go:28 +0x75
github.com/ipfs/go-libp2p/p2p/net/conn.(*singleConn).Read(0xc82a50c680, 0xc82d4453bc, 0x4, 0x4, 0xc82d445500, 0x0, 0x0)
    /home/whyrusleeping/gopkg/src/github.com/ipfs/go-libp2p/p2p/net/conn/conn.go:123 +0x6b
io.ReadAtLeast(0x7f4e408f4698, 0xc82a50c680, 0xc82d4453bc, 0x4, 0x4, 0x4, 0x0, 0x0, 0x0)
    /home/whyrusleeping/go/src/io/io.go:297 +0xe6
io.ReadFull(0x7f4e408f4698, 0xc82a50c680, 0xc82d4453bc, 0x4, 0x4, 0x0, 0x0, 0x0)
    /home/whyrusleeping/go/src/io/io.go:315 +0x62
gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio.ReadLen(0x7f4e408f4698, 0xc82a50c680, 0xc82d4453bc, 0x4, 0x4, 0xac6491, 0x0, 0x0)
    /home/whyrusleeping/gopkg/src/gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio/num.go:27 +0xb7
gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio.(*reader).nextMsgLen(0xc826ba8780, 0x7f4e408f46e8, 0x0, 0x0)
    /home/whyrusleeping/gopkg/src/gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio/msgio.go:163 +0x66
gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio.(*reader).ReadMsg(0xc826ba8780, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/whyrusleeping/gopkg/src/gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio/msgio.go:195 +0xdb
gx/ipfs/QmRQhVisS8dmPbjBUthVkenn81pBxrx1GxE281csJhm2vL/go-msgio.(*readWriter).ReadMsg(0xc82858b640, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:17 +0x70
gx/ipfs/QmbuSYB51KtX8izgab1fSyBgsyMH2hTuCfBtXm77PeXWca/go-libp2p-secio.readMsgCtx.func1(0xc82858baa0, 0x7f4e4093a8c0, 0xc82858b640, 0xc828a847e0, 0x7f4e4093a3f0, 0xc828a84660)
    /home/whyrusleeping/gopkg/src/gx/ipfs/QmbuSYB51KtX8izgab1fSyBgsyMH2hTuCfBtXm77PeXWca/go-libp2p-secio/rw.go:280 +0x48
created by gx/ipfs/QmbuSYB51KtX8izgab1fSyBgsyMH2hTuCfBtXm77PeXWca/go-libp2p-secio.readMsgCtx
    /home/whyrusleeping/gopkg/src/gx/ipfs/QmbuSYB51KtX8izgab1fSyBgsyMH2hTuCfBtXm77PeXWca/go-libp2p-secio/rw.go:285 +0xe6

It seems very strange for a read call to hang for hours without timing out or receiving some sort of activity. yamux keepalives, and random dht queries should happen more frequently than that.

Updated 05/12/2017 05:18 2 Comments

Properly integrate the iOS reachability inside Sofia SIP

RestComm/restcomm-ios-sdk

This is part of the umbrella issue: https://github.com/RestComm/restcomm-ios-sdk/issues/414

That way the networking change is handled internally and as a result affect us much less. We could expose events from the API that will notify the App that reachability has changed. Some pointers: - With the current Sofia SIP codebase this is possible for Mac but not iOS. The main difference is that Mac provides the SCDynamicStore API for that which doesn’t work in iOS (check https://github.com/RestComm/restcomm-ios-sdk/blob/master/dependencies/sources/sofia-sip/libsofia-sip-ua/su/su_os_nw.c#L228). iOS provides the Reachability API that we currently invoke from RCDevice. So the idea would be to integrate the Apple Reachability API in su_os_nw.c above. - To that end I think a great pointer is a chromium fix that seems to do exactly the same thing https://chromiumcodereview.appspot.com/10829453/ (Bug title is ‘Add iOS support to the NetworkChangeNotifier’)

Things to keep in mind (that have bitten us in the past): - It’s wise to not allow for reachability changes to be handled while the App is in the background (and on it’s way to suspended). I’ve seen that it might lead to unpredictable behavior as the handler code might be interrupted in the middle by iOS. What I have done in BETA4 is to ignore such events if the App is on the background by guarding with if ([UIApplication sharedApplication].applicationState != UIApplicationStateBackground) { all state changes. We should probably retain this logic throughout any refactoring.

Updated 26/09/2017 08:02 2 Comments

`CacheableRepository::getCacheKey()` always returns different key

andersao/l5-repository

I’m playing around with this great repo. While trying out the cache, I can’t get models from cache. So i’ve made a quick hack to the class' find() method:

public function find($id, $columns = ['*'])
{
    if (!$this->allowedCache('find') || $this->isSkippedCache()) {
        return parent::find($id, $columns);
    }

    // just a quick hack to capture the generated cache key
    $this->ppkey = $key = $this->getCacheKey('find', func_get_args());
    $minutes = $this->getCacheMinutes();
    $value = $this->getCacheRepository()->remember($key, $minutes, function () use ($id, $columns) {
        return parent::find($id, $columns);
    });

    return $value;
}

In another phpunit file to test it out:

public function testFind()
{
    $repo = new SomeRepositoryEloquent(app());
    $model = \App\Repositories\Entities\Client::find(1);
    $client1 = $repo->find(1);
    $o = $repo->ppkey;

    $client2 = $repo->find(1);
    $n = $repo->ppkey;

    // some asserts to play along with $model, $client1, and $client2

    $this->assertTrue(\Cache::has($o));  // passes
    $this->assertTrue(\Cache::has($n));  // passes

    $this->assertEquals($o, $n); // fails
}

After a bit of tracing, I’ve notice that serializeCriteria() tries to simply serialize the criteria, which in my case, is a simple RequestCriteria. Looks fine as it may, the $request property in RequestCriteria holds the whole set of environment, and serialized to different string each time.

Am I doing anything wrong?

Updated 28/10/2017 20:57 2 Comments

Need to introduce separate API for error reporting of SIP MESSAGEs

RestComm/restcomm-ios-sdk

This issues is pretty old and will probably be obsolete after we implement #577. Let’s keep it around for verification purposes:

Right now we only have didStopListeningForIncomingConnections in the Device level which assumes that the device also stopped listening for connections which isn’t the case. Notice that this API (i.e. didStopListeningForIncomingConnections) is how Twilio does error reporting for their TCDevice object (check https://www.twilio.com/docs/api/client/ios/TCDeviceDelegate#deviceDidStartListeningForIncomingConnections for more info), but if I recall correctly Twilio iOS SDK doesn’t support instant messages in that API like we do, hence they never needed to address this need.

That said I think the best way to go about it is to introduce this API: - (void)device:(RCDevice)device didReceiveTransientError:(NSError)error;

Which will be triggered for RCDevice errors that don’t cause the RCDevice to go offline. For now this is only needed for messages.

I know the name is a bit weird but I had to chose between: - Making it too generic like didReceiveError, which would make someone wonder why there are 2 separate APIs for RCDevice errors. - Another idea would be to make it only message related like didReceiveMessageError, which might be a bad choice since in the future we might find that we have other errors that don’t trigger the Device to go offline and which are not text message related - And finally something to show that the error isn’t that ‘hard’ to trigger the Device to go offline like didReceiveTransientError

Any other ideas are welcome!

Updated 26/09/2017 08:02

Sporadically media fails in a call to Restcomm

RestComm/restcomm-ios-sdk

It happens during call setup and not media is heard afterwards (scenario is a call to +1235)

Something to do with AVAudioSession it seems:

2016-02-17 17:33:49.665 restcomm-olympus[897:272435] connectionDidConnect
2016-02-17 17:33:54.957 restcomm-olympus[897:272597] 17:33:54.955 ERROR:     [Thread 0x0x17fe8530] 79: AudioSessionSetProperty posting message to kill mediaserverd (37)
2016-02-17 17:33:55.749 restcomm-olympus[897:272597] 17:33:55.749 ERROR:     [Thread 0x0x17fe8530] AVAudioSessionUtilities.h:111: GetProperty: AudioSessionGetProperty ('aiav') failed with error: '!siz'
2016-02-17 17:33:55.750 restcomm-olympus[897:272597] 17:33:55.750 ERROR:     [Thread 0x0x17fe8530] AVAudioSessionUtilities.h:124: GetProperty_DefaultToZero: AudioSessionGetProperty ('aiav') failed with error: '!siz'
2016-02-17 17:33:57.645 restcomm-olympus[897:272435] onVideoError: NSConcreteNotification 0x17e1c970 {name = AVCaptureSessionRuntimeErrorNotification; object = <AVCaptureSession: 0x17ed2bb0 [AVCaptureSessionPreset640x480]>
    <AVCaptureDeviceInput: 0x1c01e8a0 [Front Camera]> -> <AVCaptureVideoDataOutput: 0x17ed3820>; userInfo = {
    AVCaptureSessionErrorKey = "Error Domain=AVFoundationErrorDomain Code=-11819 \"Cannot Complete Action\" UserInfo=0x17ee73a0 {NSLocalizedRecoverySuggestion=Try again later., NSLocalizedDescription=Cannot Complete Action}";
}}

Full logs at:

https://gist.github.com/atsakiridis/8d18494479879d309b31

Updated 26/09/2017 08:02 2 Comments

When changing from registrar-less to non registrar-less sporadically registration fails

RestComm/restcomm-ios-sdk

Scenario: - Launch iOS Olympus in registrar-less mode (with default values for settings) - Navigate to Settings and set a valid user for cloud.restcomm.com and also setup the domain to cloud.restcomm.com - Hit back to go to main screen

At that point the registration sometimes fails and you have to go back to settings and back again for it to take effect properly. Here are the logs in the first failure:

Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:95) [RCDevice initWithParams]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (SipManager.mm:289) [SipManager initWithDelegate]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (SipManager.mm:364) [SipManager eventLoop]
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (ssc_sip.mm:231) Creating SIP stack -binding to: sip:192.168.2.3:*;transport=tcp
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:375) [RCDevice checkNetworkStatus] Reachability update: 1
Jan 19 13:56:19  restcomm-olympus[63625] <Notice>: (RCDevice.m:321) [RCDevice sipManagerDidInitializedSignalling]
Jan 19 13:57:14  restcomm-olympus[63625] <Notice>: (RCDevice.m:282) [RCDevice updateParams]
Jan 19 13:57:14  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1960) UA: un-REGISTER sip:ios-sdk@cloud.restcomm.com
Jan 19 13:57:14  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1880) REGISTER sip:ios-sdk@cloud.restcomm.com - registering address to network
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:557) Unhandled event 'nua_i_outbound' (8): 101 NAT detected
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 407 Proxy Authentication required
Jan 19 13:57:16  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1897) REGISTER: 904 Operation has no matching challenge 
Jan 19 13:57:17  restcomm-olympus[63625] <Error>: (ssc_sip.mm:1906) REGISTER failed: 904 Operation has no matching challenge 
Jan 19 13:57:17  restcomm-olympus[63625] <Notice>: (ssc_sip.mm:1909) Got failed REGISTER response but silencing it since another registration has been successfully handled afterwards
Jan 19 13:57:17  restcomm-olympus[63625] <Notice>: (RCDevice.m:329) [RCDevice didSignallingError: {
      "NSLocalizedDescription" : "Operation has no matching challenge "
    }]
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 407 Proxy Authentication required
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:635) Authenticating 'REGISTER' with 'Digest:"cloud.restcomm.com":ios-sdk:1234'
Jan 19 13:57:17  restcomm-olympus[63625] <Debug>: (ssc_sip.mm:1979) un-REGISTER: 904 Operation has no matching challenge 

This is probably related to #331, that will refactor error handing

Updated 26/09/2017 08:02 1 Comments

Loading times are not correct

ipfs/go-ipfs

Hi,

trying 0.3.8-dev on windows:

C:\Users\Piero\ipfs>ipfs add -r ..\ipfs
added QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC ..\ipfs\LICENSE-----------------------------------------------------------------------------] 0.01 % 6m25s 
added QmagNHT6twJRBZcGeviiGzHVTMbNnJZameLyL6T14GUHCS ..\ipfs\README.md---------------------------------------------------------------------------] 0.01 % 6m28s 
added QmPEKAqrHbHJLGooaCbuvoyjz7wz7h2ek8iKEAS1QF3hBt ..\ipfs\install.sh--------------------------------------------------------------------------] 0.01 % 7m16s 
added QmVXprEtK5BJbkxvXQxDmzy9mF6MDPVmRxRHWQhwNsjBZn ..\ipfs\ipfs.exe==============================================================================] 100.00 % 0 
added QmRX9fYwCvKmZ5BNApgiyrtxxvkBgQxdGSQTv8egToprRC ..\ipfs
added QmWPqQ1Wr2wJ63rqyrU61UpcsamCQy82GWbgHRk8vWLmBv

I can assure you that files where processed in seconds… not in 6m25s :)

Bye Piero

Updated 05/12/2017 03:50 2 Comments

Missing "read" dependency

marklogic/node-client-api

Examples/setup.js requires the npm “read” package, but this isn’t included in package.json.

$ node examples/setup.js 
module.js:338
    throw err;
          ^
Error: Cannot find module 'read'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/dcassel/tmp/myproject/node_modules/marklogic/etc/test-setup-prompt.js:16:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/dcassel/tmp/myproject/node_modules/marklogic/examples/setup.js:21:22)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
Updated 16/11/2017 02:47 5 Comments

Allow auto-generated URIs in bulk document operations

marklogic/java-client-api

It would be nifty if DocumentWriteSet had additions similar to these:

public DocumentWriteSet add(DocumentUriTemplate template, AbstractWriteHandle contentHandle);
public DocumentWriteSet add(DocumentUriTemplate template, DocumentMetadataWriteHandle metadataHandle, AbstractWriteHandle contentHandle);

so that we can have URIs generated in the database. That would cause issues with DocumentWriteOperation since that only deals with uris and would need to store the template information.

Then in JerseyServices postBuilkDocuments there can be logic to check for uri vs. extension (and potentially directory) and add the appropriate content disposition for the REST endpoint, something like:

attachment; extension="json"; directory="/where/I/want/it"

In the end, I dig through too much code for my own good and however it is implemented is not important, I would just love being able to do bulk operations yet have the URIs auto generated like I am able to do with a single document.

Updated 30/11/2017 17:47 2 Comments

After and before hooks ?

andersao/l5-repository

Hello,

Maybe it is a good idea to add the after / before hooks for delete / create / update ?

Something like :

public function update(array $attributes, $id)
    {
        $this->applyScope();
        if ( !is_null($this->validator) ) {
            $this->validator->with($attributes)
                ->setId($id)
                ->passesOrFail( ValidatorInterface::RULE_UPDATE );
        }
        $_skipPresenter = $this->skipPresenter;
        $this->skipPresenter(true);
        $model = $this->model->findOrFail($id);

        // before
        $methodBefore = 'beforeUpdate';
        if (method_exists($this, $methodBefore)) {
            $result = call_user_func_array([$this, $methodBefore], [$model, $attributes]);
            if ($result === false) return $result;
        }

        $model->fill($attributes);
        $model->save();

        // after
        $methodAfter = 'afterUpdate';
        if (method_exists($this, $methodAfter)) {
            $result = call_user_func_array([$this, $methodAfter], [$model, $attributes]);
            if ($result === false) return $result;
        }

        $this->skipPresenter($_skipPresenter);
        $this->resetModel();
        event(new RepositoryEntityUpdated($this, $model));
        return $this->parserResult($model);
    }

Then implement the required method in the repository :

class UserRepository extends BaseRepository
{

    /**
     * Specify Model class name
     * @return string
     */
    function model()
    {
        return \TrackerApi\Models\User::class;
    }

    public function beforeUpdate($model, $attributes)
    {
        // Before
    }

    public function afterUpdate($model, $attributes)
    {
        // after
    }

}

What do you think ?

Updated 28/10/2017 20:53 4 Comments

an error without an error callback emits a spurious Bluebird error

marklogic/node-client-api

The spurious error is:

node_modules/bluebird/js/main/async.js:36 fn = function () { throw arg; };

The root error is still reported. In addition, the application should provide an error callback for better error reporting.

A quick search shows that the request module found a configure solution:

https://github.com/request/request-promise/commit/bc6080e501a406eb03ec779dd50458cde1bce7aa

But more investigation is needed.

Updated 05/12/2017 18:53

/api/v0/get doesn't respect the output argument

ipfs/go-ipfs

http://127.0.0.1:5001/api/v0/get?arg=QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ%2Fcat.jpg&o=%2Ftmp%2Fcat.jpg

This http request will discard the “&o=/tmp/cat.jpg” part and return the file content in the http answer.

As far as I can tell, there is no way to actually write the plain file on disk using the API. Am I correct on this one ?

Updated 09/10/2017 17:18 20 Comments

Java eval method never see's a null type

marklogic/java-client-api

Xquery never returns a null value, but it can return () empty sequence Java script can retun a null value but in both the case I see the same output from REST, which is not a null here is the example curl -i –digest –user admin:admin -d ‘javascript=null’ -X POST ‘http://localhost:8000/eval’ HTTP/1.1 401 Unauthorized WWW-Authenticate: Digest realm=“public”, qop=“auth”, nonce=“f70133b55da510031f214c248e81d28a”, opaque=“8d3a380fb0052961” Content-Type: text/html; charset=utf-8 Server: MarkLogic Content-Length: 209 Connection: Keep-Alive Keep-Alive: timeout=5

HTTP/1.1 200 OK Server: MarkLogic 8.0-20141020 Set-Cookie: TxnMode=auto; path=/ Set-Cookie: TxnID=null; path=/ Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5

curl -i –digest –user admin:admin -d ‘xquery=()’ -X POST ‘http://localhost:8000/eval’ HTTP/1.1 401 Unauthorized WWW-Authenticate: Digest realm=“public”, qop=“auth”, nonce=“6c8c0211ac3d782c0b905e69cc36b7ac”, opaque=“fdfd7139910cea6f” Content-Type: text/html; charset=utf-8 Server: MarkLogic Content-Length: 209 Connection: Keep-Alive Keep-Alive: timeout=5

HTTP/1.1 200 OK Server: MarkLogic 8.0-20141020 Set-Cookie: TxnMode=auto; path=/ Set-Cookie: TxnID=null; path=/ Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5

I am expecting a null to be return in case of javascript.

Updated 13/11/2017 19:15

Remove Wordpress nag messages about upgrades

uboslinux/ubos-wordpress

They make no sense in an UBOS context. How to: - http://www.wprecipes.com/how-to-disable-the-please-update-now-message-in-wp-dashboard - http://wpmu.org/daily-tip-how-to-disable-the-wordpress-update-notice/ - http://wordpress.stackexchange.com/questions/77148/remove-update-messages-for-deactivated-plugins

Updated 02/12/2017 05:04

Fork me on GitHub