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

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

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

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

Kconfig introduces undocumented dependencies to kernel sources

open-power/snap

On Ubuntu 16.04 LTS the initial snap configuration with all dependencies as listed in the README in place fails with the following error message: ${SNAP_ROOT} $ make snap_config menuconfig: Setting up SNAP configuration SNAP Build Options Linux: /usr/src/kernels/4.4.0-96-generic Build: /home/lwenzel/mp2017/snap_new/scripts/build Kconfig: /home/lwenzel/mp2017/snap_new/scripts/Kconfig config: ../.snap_config autoconf: ../software/include/autoconf.h ERROR: Not able to generate SNAP config files via kconfig, because directory /usr/src/kernels/4.4.0-96-generic does not exist. Makefile:26: recipe for target 'menuconfig' failed make[2]: *** [menuconfig] Error 1 Makefile:112: recipe for target 'menuconfig' failed make[1]: *** [menuconfig] Error 1 Makefile:126: recipe for target 'snap_config' failed make: *** [snap_config] Error 1

Simply installing the kernel sources does not solve the problem, as on Ubuntu they reside in /usr/src/linux-source-vvv and not the expected /usr/src/kernels/vvv. It works with a symlink, but this should be documented properly or the kernel source discovery mechanism made more flexible.

Updated 16/10/2017 10:23 7 Comments

Parameters not replaced / incorrectly replaced

taligen/taligen

Test files. a.tl: ``` A: executing a

call: b( par=abc )

call: b( par=def ) b.tl: A: This is b with par $par when invoked with: taligen a.tl produces a JSON file that does not replace ``$par`` at all. If I invoke it like this: taligen a.tl par=xxx ` the JSON file replaces$parwithabcanddef`` as intended. But it shouldn’t need to be triggered like this.

Updated 11/09/2017 18:31

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

"Missing value" in sub-tl where super-tl defines value with set:

taligen/taligen

To reproduce:

  1. git clone https://github.com/uboslinux/ubos-tasks
  2. cd ubos-tasks
  3. git reset --hard 23e41b92fd715f58920fbda2bf072cdc81bc0d80
  4. taligen create-release-ubos.tl channel=dev

Fails with: Error: Missing value for variable product for step fetch a exec: "macrobuild fetch-$product -v" call stack is ["create-release-ubos.tl(['channel=dev'])", "./archs/createUbosReleaseFor.arch=x86_64.tl({'arch': 'x86_64'})", './archs/../lib/createUbos.channel=dev.tl({})', './archs/../lib/fetch.tl({})'] However, fetch.tl should have inherited the value for product from createUbos.channel=dev.tl.

Updated 11/09/2017 19:00

Parameter not overridden

taligen/taligen

This .tl file fragment:

set: product=ubos

call: lib/runAutomatedTests()
call: lib/runAutomatedTests( product=app )

Both of the runAutomatedTests() produce the same .json output, replacing product with ubos. But in the second case product should be replaced with app.

Updated 07/09/2017 03:38

Update to 2.0.2 breaks modelIndex

strongloop/loopback-connector-cloudant

Description/Steps to reproduce

I was updating my API from loopback 2.x to 3.x. I also updated loopback-connector-cloudant to 2.x. After I had resolved all other issues, my last problem is that when I try to use my application, my first API query fails with:

Unhandled error for request GET /api/csp/sites?filter=%7B%22where%22:%7B%22name%22:%7B%22regexp%22:%22%2Ffoo%2Fi%22%7D%7D,%22order%22:%22name+DESC%22,%22limit%22:10%7D: Error: You must specify an index with the `use_index` parameter.
    at Request._callback (D:\Src\KONE\DCT\api\node_modules\cloudant-nano\lib\nano.js:248:15)
    at Request.self.callback (D:\Src\KONE\DCT\api\node_modules\request\request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (D:\Src\KONE\DCT\api\node_modules\request\request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (D:\Src\KONE\DCT\api\node_modules\request\request.js:1091:12)
    at IncomingMessage.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

In my datasouce config I have: modelIndex: 'modelIndex' I also tried configuring indexes separately for said model, without success.

Rolling back to 1.2.5 fixed the problem.

Link to reproduction sandbox

I don’t have spare VM instances just laying around.

Note: Failure to provide a sandbox application for reproduction purposes will result in the issue being closed.

Well, that’s a bit hostile.

Expected result

Old models with old indexes continue to work.

Additional information

win32 x64 6.10.1

+-- loopback@3.11.1
+-- loopback-boot@3.0.1
+-- loopback-component-explorer@4.2.0
+-- loopback-component-passport@3.4.1
+-- loopback-connector-cloudant@2.0.2
Updated 02/10/2017 15:20 3 Comments

Error in /uEnv-sata.txt

uboslinux/ubos-packages

bootargs=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/sdb2 rw rootwait

but that makes no sense, as we do not have a /dev/sdb. It should be:

bootargs=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/sda2 rw rootwait

Updated 24/08/2017 17:48

sterben ist Buggy

combak/ShatteredWorld

Wenn jemand stirbt spawnt kein Grabstein und die Items sind weg um Genauer gesagt stirbt man Nichtmal offiziell sonder man ist einfach weg dadurch funktioniert Nichtmals solbound aus arsmagika2

/Edit by DerOli82 - Kommentare zusammengefasst es handelt sich um die spieler Minion1311 CD4017BE TheSnowyChickens

Updated 26/08/2017 12:22 9 Comments

Need Accessory dependencies

uboslinux/ubos-admin

We need to be able to say that use of Accessory X requires use of Accessory Y for any AppConfiguration at which X is used. We can put this into the accessoryinfo section in the manifest (doc).

Modifications required:

  • createsite needs to check this, and automatically add another iteration of the loop in which it asks for customization points values for required accessories
  • Site JSON is only valid if an AppConfig lists all Accessories required by any other Accessory
Updated 25/08/2017 18:34

Add option to disable automatically outputting helpfile information on bad option entry

marklogic/marklogic-contentpump

Perhaps add an option in the lo4j properties not to spit out the help file content for a misconfigured command line config option?

Some of these help file entries are pretty large, and can make it difficult to see what the input error was in environments with limited scrollback capability.

This is a minor request to improve usability in difficult environments.

Updated 02/08/2017 17:07 5 Comments

When generating pacman.conf, replace $channel

uboslinux/ubos-admin

Pacman doesn’t know how to handle variables that it hasn’t hard-coded in. It would be nice if there was a single UBOS channel variable somewhere and the pacman repos could reference that. Do this:

  • create /etc/ubos/channel if does not exist already
  • have /etc/pacman.d/repositories.d/* use $channel in their path names
  • when we generate /etc/pacman.conf, we don’t just concatenate, but also replace $channel
Updated 25/07/2017 19:16

Refactor synopsisHelp API

uboslinux/ubos-admin

It currently returns a hash of command-line to description. This forces us to repeat the documentation of all parameters for each form of command-line. That’s not good. Instead:

Return a hash of two hashes, with keys “cmds” and “args”. The previous return goes into “cmds” and the hash of command-line arguments to explanations goes into the second.

Updated 20/07/2017 03:46

Create mechanism for additional option files for mysql

uboslinux/ubos-admin

Per https://dev.mysql.com/doc/refman/5.7/en/option-files.html, apparently one can say: !includedir /home/mydir So we can create /etc/mysql.d or such. Move replication options from /etc/ubos-mysql.conf into there, and only keep those options that a new version of ubos-admin gets to overwrite. Mark all files in /etc/mysql.d as options files not to be overwritten if changed in PKGBUILD.

Updated 20/07/2017 20:07

XCC performance better than 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 16/08/2017 22:27 25 Comments

test suite failures due to lack of xdmp:get-server-field privilege

marklogic/java-client-api

Running the test suite from the develop branch yields 5 failures/132 errors. Many of these errors are due to the request user not having the xdmp:get-server-field privilege. Log is attached.

Tests were run in the following environment:

ML version: 9.0-1.1 OS: MacOS.
Java version: 1.8.0_102-b14.
Client API: develop branch at https://github.com/marklogic/java-client-api/commit/bdbfa6d2eff495000ac4b45b5b9385efabc4291c.
Maven: Apache Maven 3.5.0

This was a brand new installation of everything except Java: I had freshly installed Maven for the first time, ML was a bare install of 9.0-1.1, and I had newly cloned the develop branch. I ran mvn test-compile, followed by mvn exec:java@test-server-init, followed by mvn test..

When I gave the rest-writer role the xdmp:get-server-field privilege, most of the errors went away and I was left with errors that Sam Mefford was also getting, plus five semantics-related errors.

java-client-api-develop-failures.txt

Updated 17/08/2017 20:47 7 Comments

Improve backup-to-amazon-s3 error message

uboslinux/ubos-admin

Currently it says: ubos-admin backup-to-amazon-s3 -v INFO : ubos-admin backup-to-amazon-s3 -v INFO : Suspending sites INFO : Creating and exporting backup INFO : Resuming sites ERROR: upload failed: ../tmp/8wC4koRIJ2 to s3://ubos-backup-xxxxx/multi-xxxxx-20170708232442.ubos-backup An error occurred (NoSuchBucket) when calling the CreateMultipartUpload operation: The specified bucket does not exist

Updated 20/07/2017 03:46 1 Comments

Add plugins

uboslinux/ubos-wordpress

Need the following plugins: * indieweb https://wordpress.org/plugins/indieweb/ Themes: * independent-publisher (looks nicer) https://wordpress.org/themes/independent-publisher/ * sempress (more geared towards microformats) https://wordpress.org/themes/sempress/

Updated 18/07/2017 01:39

missing javadoc for PlanBuilderBase.PlanBase and friends

marklogic/java-client-api

I tripped over this while trying to figure out if I could export an Optic plan using the Java Client API. You get 404’d if you try to navigate to the javadoc for PlanBase and some of its sibling interfaces. These bad boys, which show up under PlanBuilder. static interface PlanBuilderBase.AccessPlanBase static interface PlanBuilderBase.ExportablePlanBase static interface PlanBuilderBase.ModifyPlanBase static interface PlanBuilderBase.PlanBase static interface PlanBuilderBase.PreparePlanBase It’s not just some weirdness on docs.marklogic.com as you get the same missing page behavior with a set of static javadocs on the local filesystem.

To see this in action: 1. Navigate to the PlanBuilder javadoc: http://docs.marklogic.com/javadoc/client/com/marklogic/client/expression/PlanBuilder.html 1. Under the Nested Class Summary, click on one of the above listed interfaces, such as PlanBase.

Updated 11/09/2017 20:34 9 Comments

Improve backupinfo output

uboslinux/ubos-admin

With a backup file that only contains a single AppConfiguration, the output is this:

[root@ubos-raspberry-pi2 shepherd]# ubos-admin backupinfo --in /tmp/foo.a02d1954d84f6e48bd4ed31caedf3da02fb14ac71.ubos-backup 
Type:    ubos-backup
Created: 20170605-040324
=== Unattached AppConfigurations ===
AppConfiguration: /shaarli (a02d1954d84f6e48bd4ed31caedf3da02fb14ac71): shaarli
    app:      shaarli
         customizationpoint salt: HASH(0x1384368)
         customizationpoint timezone: HASH(0x1384348)
         customizationpoint title: HASH(0x1384328)

No idea why it prints the customizationpoints here. It doesn’t for whole sites.

Updated 20/07/2017 20:30

Denormalized sub-entities

marklogic/entity-services

When putting entity instances into documents, one always chooses one to be the root, and others to embed or denormalize into the document structure.

Entity Services in MarkLogic 9 does not provide this vocabulary, but repeated use of the code generation indicates that it could be automated significantly with this extra concept.

  1. Entry point of a module is known.
  2. Expectations of whether a reference property contains an embedded instance or a reference to an external one.
  3. Refinement of extraction template to require less customization.
Updated 22/08/2017 22:45 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 01/09/2017 21:25 7 Comments

'swarm connect' fails on LAN-- "invalid multiaddr" despite valid multiaddr

ipfs/go-ipfs

<!– Output From ipfs version --all) –>

Version information: go-ipfs version 0.4.4

<!– Bug, Feature, Enhancement, Etc –>

Type: Bug

<!– from P0 “Critical” to P5 “Relatively Unimportant”) –>

Priority: P5

Description:

Using go-ipfs 0.4.4 on Windows 8.1 in a LAN network, this command fails:
ipfs swarm connect /ip4/10.145.24.153/tcp/4001/ipfs/$HASH (Pretend $HASH is a valid hash.) Each time IPFS immediately aborts and gives an invalid multiaddr error. Other variations, like ipfs swarm connect "/ip4/10.145.24.153/tcp/4001/ipfs/$HASH" etc. also don’t work. I’ve tried every variation I could think of.
The subnets match and other programs that support LAN works just fine– everything seems to check out on that end. I double-checked the IP addresses and IPFS hashes, etc…

<!– This is for you! Please read, and then delete this text before posting it. The go-ipfs issues are only for bug reports and directly actionable features. Read https://github.com/ipfs/community/blob/master/contributing.md#reporting-issues if your issue doesn’t fit either of those categories. Read https://github.com/ipfs/go-ipfs/blob/master/docs/github-issue-guide.md if you are not sure how to fill in this issue. –>

Updated 02/09/2017 21:43 1 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 15/10/2017 04:28 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 15/10/2017 01:43 5 Comments

Assemble model descriptors from graph

marklogic/entity-services

As a data steward, I want to be able to organize my entities into descriptor docs as I see fit, for example, to group related entities into their own descriptor documents or separate entities into one descriptor per entity or to have just one descriptor doc for all entities. Each grouping should distill into the same entity type graph. Today, the downstream artifact generators assume one in-memory map structure that represents the entire type model. This is a direct mapping from a single descriptor doc that represents all entities. It should be possible to assemble the in-memory descriptors needed from code gen regardless of how the input entity definitions are grouped.

One implementation idea is to provide a function that would operate on the triples to assemble a map/object. Someone extending the model would also use this same technique to build custom in-memory representations of their extensions.

Some things to consider: - Versioning today is declared at the descriptor. Thus all entities declared in a single descriptor will have the same semver. I’d expect stewards to want to version entities at different rates. - (Now I can’t remember the other thing)

Updated 24/07/2017 14:33 4 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 01/09/2017 21:43 5 Comments

Referentially consistent export

marklogic/entity-services

Use the entity model to get a consistent subset of entities and their related entities that. For example, get me the 50 most recent customers, their related sales orders, products, etc. Handle cycles and, perhaps, truncate at some depth to avoid always getting the whole database. Export all reference data each time.

Updated 25/08/2017 17:46 6 Comments

Optic API support

marklogic/node-client-api
  • Plan builder to express queries in JavaScript
  • Interoperability with other Java builders, such as cts:query or QBE
  • Efficient handling of tuple results
  • Map results to JavaScript/Node types and common I/O patterns (e.g. streams)
  • Performance, especially for large record sets, millions of results, rather than pages as we assume with search results
Updated 21/09/2017 22:05 12 Comments

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

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

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

Smooth scrolling issue

AddonLab/AiOS

With opened All-in-One Sidebar (Bookmarks, History, Downloads, Add-ons or others) smooth scrolling stops working on a page. When sidebar is closed, smooth scrolling works again. Tested on clean Firefox portable.

Updated 06/09/2017 16:25 1 Comments

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

Error: unable to open leveldb datastore

ipfs/go-ipfs

In the morning my computer “froze” (became unresponsive) and I had to reset it; the reason behind it was, I suppose, not related to go-ipfs.

After the reboot I tried to run IPFS and got the following message:

Error: failed to create lock file (lock path here) open (lock path here) : The file exists.

This is natural after an unexpected reboot.

I have deleted the lock file using the given path and then attempted to restart IPFS. I’ve got the following message:

Error: unable to open leveldb datastore

There’s literally nothing I could do about it, and thus I eventually resorted to ipfs init -f and lost my pinned media, an associated IPNS name, etc.

Consider choosing some other key+value storage that survives an unexpected reboot better than LevelDB.

For example, SQLite implements serializable transactions that are atomic, consistent, isolated, and durable, even if the transaction is interrupted by a program crash, an operating system crash, or a power failure to the computer. SQLite also has an extension useful for managing JSON content stored in an SQLite database.

Updated 06/08/2017 23:30 16 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 24/07/2017 20:24 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 01/09/2017 19:51 2 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 24/07/2017 20:25

/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

Index CRUD and validation

marklogic/node-client-api

In 8.0-1, the Management API added full CRUD support for indexes. The Node.js API could expose those CRUD operations through a JavaScript interface.

In addition, the Query Builder (and Values Builder) could run in a validate mode that reports a facet or sort key or other property use that’s not backed by a range index (providing contextual, fail-fast feedback instead of leaving it to the user to map from server errors to client code).

To keep the surface area easy to understand, we would only want to expose configuration that changes frequently during application development – maybe only field, geospatial, path, and range indexes for now. We might defer triggers and CPF for now.

Updated 13/09/2017 23:04

No close button on high-resolution screen

AddonLab/AiOS

The red X close button appears on my desktop AIOS and my old laptop AIOS but not my new laptop AIOS. I suspect this may be due to FireFox’s scaling, as my new laptop is a Yoga 3 Pro with a quad-HD screen: 3200x1800. Any insight welcomed.

Updated 06/09/2017 16:33 1 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 01/09/2017 19:10

Security-Alert with numpy? pyconfig.h

pyinstaller/pyinstaller

Original date: 2014/06/11

I’m having trouble making a one-folder version of my module. It always runs into the security alert below. I am running Enthought Canopy python on linux (canopy-1.2.0.1610.rh5-x86_64). I’ve narrowed down a pyinstaller problem to the numpy import:

[dm225@login-02 pyinstaller_tests]$ more test.py
import numpy

[dm225@login-02 pyinstaller_tests]$ pyinstaller test.py

fatal: Not a git repository (or any of the parent directories): .git
23 INFO: wrote /home/dbchem/dm225/.local/installers/pyinstaller_tests/test.spec
50 INFO: UPX is not available.
74 INFO: Processing hook hook-os
179 INFO: Processing hook hook-time
219 INFO: Processing hook hook-_sre
245 INFO: Processing hook hook-cStringIO
255 INFO: Processing hook hook-codecs
268 INFO: Processing hook hook-encodings
852 INFO: Processing hook hook-cPickle
975 INFO: Extending PYTHONPATH with /home/dbchem/dm225/.local/installers/pyinstaller_tests
975 INFO: checking Analysis
976 INFO: building Analysis because out00-Analysis.toc non existent
976 INFO: running Analysis out00-Analysis.toc
1011 INFO: Analyzing /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/_pyi_bootstrap.py
1030 INFO: Processing hook hook-os
1043 INFO: Processing hook hook-site
1068 INFO: Processing hook hook-encodings
1218 INFO: Processing hook hook-time
1287 INFO: Processing hook hook-_sre
1346 INFO: Processing hook hook-cStringIO
1360 INFO: Processing hook hook-codecs
2069 INFO: Processing hook hook-cPickle
2285 INFO: Processing hook hook-pydoc
2497 INFO: Processing hook hook-email
2579 INFO: Processing hook hook-httplib
2627 INFO: Processing hook hook-email.message
2726 INFO: Analyzing /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/pyi_importers.py
2782 INFO: Analyzing /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/pyi_archive.py
2834 INFO: Analyzing /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/pyi_carchive.py
2887 INFO: Analyzing /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/pyi_os_path.py
2893 INFO: Analyzing test.py
3702 INFO: Processing hook hook-parser
3833 INFO: Processing hook hook-distutils
4063 INFO: Processing hook hook-sysconfig
4160 INFO: Processing hook hook-xml
4259 INFO: Processing hook hook-xml.sax
4291 INFO: Processing hook hook-pyexpat
4916 INFO: Processing hook hook-setuptools
5496 INFO: Hidden import 'codecs' has been found otherwise
5496 INFO: Hidden import 'encodings' has been found otherwise
5497 INFO: Looking for run-time hooks
5497 INFO: Analyzing rthook /home/dbchem/dm225/.local/installers/AlGDock-0.0.1/AlGDock/src/pyinstaller/PyInstaller/loader/rthooks/pyi_rth_pkgres.py
6498 INFO: Using Python library /home/dbchem/dm225/.local/Canopy_64bit/System/bin/../lib/libpython2.7.so.1.0
6722 INFO: Warnings written to /home/dbchem/dm225/.local/installers/pyinstaller_tests/build/test/warntest.txt
6748 INFO: checking PYZ
6749 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
6749 INFO: building PYZ (ZlibArchive) out00-PYZ.toc
10147 INFO: checking PKG
10148 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
10148 INFO: building PKG (CArchive) out00-PKG.pkg
10242 INFO: checking EXE
10244 INFO: rebuilding out00-EXE.toc because test missing
10244 INFO: building EXE from out00-EXE.toc
10246 INFO: Appending archive to EXE /home/dbchem/dm225/.local/installers/pyinstaller_tests/build/test/test
10315 INFO: checking COLLECT
10316 INFO: building COLLECT out00-COLLECT.toc
Security-Alert: try to store file outside of dist-directory. Aborting. '../../installers/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/include/python2.7/pyconfig.h'

here is a hack workaround

I’m not sure if it breaks other things.

for ind in reversed(range(len(a.datas))):
    if a.datas[ind][0].startswith('..'):
        print 'Removing %s from datas'%a.datas[ind][0]  
        a.datas.pop(ind)
Updated 31/08/2017 20:51 2 Comments

Fatal Error 126 after compiling exe on Win 7 - Matplotlib

pyinstaller/pyinstaller

Original date: 2014/01/07 Original reporter: allankey

I created an exe file on Win 7 and pyinstaller seems to have compiled it ok. The program opens and runs fine up until I try to plot a graph using matplotlib, at which point the program crashes and I get the console error message:

MKL FATAL ERROR: cannot load neither mk2_avx.dll nor mk2_def.dll

Any ideas on why this is happening and what can be done to solve it? I am not sure if it’s an issue with matplotlib or something else.

Thanks in advance for any help.

Updated 21/08/2017 15:38 19 Comments

Importing scipy.signal with onefile option produces WARNING..... pyconfig.h already exists

pyinstaller/pyinstaller

Original date: 2013/09/25 Original reporter: *jonnojohnson AND gmail DOT COOM *

If I create a script with only the line:

import scipy.signal

and build with the -F option I get the following warning when launching the exe:

WARNING: file already exists but should not: C:\Users\...\Include\pyconfig.h

I’ve seen this in other versions but definitely in: 2.1dev-e958e02

Updated 31/08/2017 20:50 5 Comments

tcl encodings not bundled with Tkinter

pyinstaller/pyinstaller

Original date: 2013/07/25 Original reporter: anonymous

Text input unable in Tkinter entry field due bad encoding on Windows with non-ascii locale (cp1251 in my case) after building application by Pyinstaller-2.0 and Python-2.7 The reason - no encoding directory in MEI\tcl of builded application. Workaround - manual copy directory tcl\tcl8.5\encoding from Python’s install to MEI\tcl\encoding of builded distrib. Maybe this behavior should respect –ascii option of pyinstaller.py

Updated 06/09/2017 16:16

Again: Multiprocessing and --onefile under Windows, now: Pools

pyinstaller/pyinstaller

Original date: 2013/03/04 Original reporter: Markus DOT Piotrowski AND ruhr DASH uni DASH bochum DOT de @MarkusPiotrowski

I’m trying to pack a program which uses multiprocessing.Pool(). While –onedir is fine, –onefile results in runtime errors (translated from German):

WindowsError:[Error 5] Access denied and (sometimes) WindowsError:[Error 6] No such handle 

Of course I tried the recipe which works fine for me for multiprocessing.Process but it does not seem to work with pools. Do you have an idea, how I have to change the recipe?

System: Win7, 64 bit (problem also under 32 bit Win7) Python: 2.7.2 Pyinstaller: recent development branch Attached file: Pool_Test.py

Updated 31/08/2017 20:50 5 Comments

During a MERGE build, a manifest file is created for the spec file, and is not used

pyinstaller/pyinstaller

Original date: 2012/05/31 Original reporter: *ddwiggins AND advpubtech DOT COOM *

(I’m classifying this as an enhancement, because it doesn’t affect the final result of building.)

I’m using MERGE to built a suite of applications. The spec file is called FalconApps.spec; none of the executables have the name FalconApps.

During the build, the manifest file FalconApps.exe.manifest gets created in the build folder, and rewritten for each executable. On subsequent builds, this causes the .pkg file to be rebuilt because the manifest file has changed, and that in turn causes the EXE.toc file to be rebuilt. To prevent this, I’ve created the following patch in build.py:

@@ -967,8 +967,9 @@ class EXE(Target):
                 self.toc.extend(arg)
         if is_win:
             filename = os.path.join(BUILDPATH, specnm + ".exe.manifest")
-            self.manifest = winmanifest.create_manifest(filename, self.manifest,
-                self.console)
+            if not os.path.exists(filename):
+                self.manifest = winmanifest.create_manifest(filename, self.manifest,
+                                                            self.console)
             self.toc.append((os.path.basename(self.name) + ".manifest", filename,
                 'BINARY'))
         self.pkg = PKG(self.toc, cdict=kws.get('cdict', None),

I’m not necessarily proposing this as the best solution, although it does work for me.

There’s another question here, though: should this file be created at all? Each executable gets its own manifest file, placed next to the executable, and as far as I can tell, nothing is done with FalconApps.exe.manifest.

Updated 10/08/2017 16:09

patch: Interactive frozen script goes to background on SIGINT

pyinstaller/pyinstaller

Original date: 2010/09/20

Hi,

I have frozen a python program that implements a user CLI. Normally, it dies catch KeyboardInterrupt, but when frozen this does not works anymore as expected. Setting a SIGINT handler in my python code shows that the signal indeed gets to it, but no matter how I handle the signal at the python level, it seems that the froxen process goes to the background. I use readline, and am unsure if this is connected, but when the process is in the background, I still get garbage on the terminal (my prompt it seems), like if the std in/out were not completely disconnected.

I am using a onefile frozen binary, with pyinstaller 1.4.

When I apply the following patch to make sure the wrapper pyinstaller code does not catch signals anymore, everything works as expected. The patch is next. What do you think ? Is there some problem doing that ? Does my patch makes sense ? At least it solves the problem for me….

--- pyinstaller-1.4/source/linux/main.c 2009-09-25 19:28:28.000000000 +0200
+++ pyinstaller-1.4b/source/linux/main.c    2010-09-19 20:10:09.000000000 +0200
@@ -28,6 +28,7 @@
 #include "launch.h"
 #include "getpath.h"
 #include <sys/wait.h>
+#include <signal.h>

 #ifdef FREEZE_EXCEPTIONS
 extern unsigned char M_exceptions[];
@@ -75,6 +76,12 @@
     int rc = 0;
     int pid;
     char *workpath = NULL;
+
+    // Ignore signals that should be handled by the python script
+    signal(SIGINT, SIG_IGN);
+    signal(SIGABRT, SIG_IGN);
+    signal(SIGTERM, SIG_IGN);
+
     /* atexit(cleanUp); */
 #ifdef FREEZE_EXCEPTIONS
     PyImport_FrozenModules = _PyImport_FrozenModules;
Updated 31/08/2017 20:50 8 Comments

Fork me on GitHub