marklogic-contentpump icon indicating copy to clipboard operation
marklogic-contentpump copied to clipboard

Mlcp Export not working with < cts query

Open rajessh-m opened this issue 7 years ago • 5 comments

Hi when i try to do a export using <= i am getting the following error . Iam storing the cts:andquery in a file Error 18/05/30 12:59:08 ERROR contentpump.LocalJobRunner: Error getting input splits: 18/05/30 12:59:08 ERROR contentpump.LocalJobRunner: com.marklogic.xcc.exceptions.XQueryException: XDMP-DOCATTRVALCHAR: xdmp:unquote("<cts:and-query xmlns:cts="http://marklogic.com/cts"><c...") -- Invalid attribute value character "<" or missing close quote at line 1

sample query :</cts:and-query> <cts:element-range-query operator="&lt;="> <cts:element xmlns:sss=ns">sss:somevfiled</cts:element> <cts:value xsi:type="xs:date" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">value</cts:value> </cts:element-range-query> </cts:and-query>

rajessh-m avatar May 30 '18 17:05 rajessh-m

Do you have the mlcp command for us to reproduce the problem?

jxchen-us avatar May 31 '18 03:05 jxchen-us

This is the mlcp command . Any queryfilter with < symbol u will be able to reproduce mlcp.sh export -conf "ssl-configfile" -options_file queryfilter.txt -host $xcc_host -port $xcc_port -username $user_id -password $password -mode local -thread_count $THREAD_COUNT -output_file_path $output_file_path -copy_metadata "false" -copy_permissions "false"

rajessh-m avatar May 31 '18 15:05 rajessh-m

Thanks for providing the mlcp command. Apparently it is not self-contained. Can you provide ssl-configfile and queryfilter.txt in order for us to investigate?

jxchen-us avatar May 31 '18 16:05 jxchen-us

Hey it may cause security issue for me .. the ssl-cofig file has the details for ssl authentication .. we can remove that parameter if ssl is not enabled in your local and for the query anything with < is going to cretat that issue . the skeleton of the query is as follows <cts:and-query xmlns:cts="http://marklogic.com/cts"> <cts:element-range-query operator="="> cts:elementdocument-type</cts:element> <cts:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">tsm</cts:value> cts:optioncollation=http://marklogic.com/collation/codepoint</cts:option> </cts:element-range-query> <cts:element-range-query operator="="> cts:elementtype</cts:element> <cts:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">test</cts:value> cts:optioncollation=http://marklogic.com/collation/codepoint</cts:option> </cts:element-range-query> <cts:element-range-query operator="&lt;="> <cts:element xmlns:clm="">clm:indexname</cts:element> <cts:value xsi:type="xs:date" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2017-03-30-04:00</cts:value> </cts:element-range-query> <cts:element-range-query operator="="> cts:elementsystem-end-date</cts:element> <cts:value xsi:type="xs:dateTime" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2018-01-01T00:00:00</cts:value> </cts:element-range-query> <cts:element-range-query operator="&gt;"> cts:elementsystem-start-date</cts:element> <cts:value xsi:type="xs:dateTime" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2018-01-01T00:00:00</cts:value> </cts:element-range-query> </cts:and-query>

rajessh-m avatar May 31 '18 19:05 rajessh-m

Right, it doesn't have to be exactly what you have. We just need a self-contained test case in order to investigate.

jxchen-us avatar May 31 '18 19:05 jxchen-us