KB Article #176379

ant exportDocuments with parameters including " "

Problem

When launching command ant exportDocuments with parameters which contain " " with escape
./ant.sh (...) -DExportDocsByFilterConditionFilter=LIFECYCLE_STATUS=\"2\" (...) exportDocuments
getJavaProgramArgs:

[java] INFO Connecting to http://127.0.0.1:8080/interplay-web/services/DataManagementService [^]
[java] INFO Deploying module: addressing
[java] INFO Setting time out 3000000
[java] INFO open session ...
[java] WARN Failed to decrypt password, InterPlay will use it as it is provided
[java] INFO Session : xQM1FowkBnL8y2EVqhUa86716
[java] INFO Export Document (xQM1FowkBnL8y2EVqhUa86716)
[java] INFO The filter used for exporting business collections is: LIFECYCLE_STATUS=2
[java] INFO The path where the business collection will be saved is: /appli/AURECCA//axway/InterPlay/extra/Samples/Export/AURECCA
[java] INFO The target status in which the exported collections will be changed is: 3
[java] INFO The document will be exported using the english locale
[java] INFO Returned server response:
[java] Invalid condition text. Quote expected in 'LIFECYCLE_STATUS=2' for the given condition text.
[java] INFO Close session xQM1FowkBnL8y2EVqhUa86716

we have 'invalid condition text' and the export doesn't successed.



Resolution


The problem is in ant command. The workaround is to double escape it:

./ant.sh (...) -DExportDocsByFilterConditionFilter=LIFECYCLE_STATUS=\\\"2\\\" (...) exportDocuments
or to use apostrophes and escape the quotes:
./ant.sh -(...) -DExportDocsByFilterConditionFilter=LIFECYCLE_STATUS='\"2\"' (...) exportDocuments


There is no fix as the issue come from ant command not on the product.