Closed bsrikan closed 7 years ago
What's odd about this bug is that I have a test case, which looks like this one, that works. Something fishy going on...
Ah, no, i do have a gap in my unit tests. I tested element range index with a namespace, but not without.
OK, test and fix implemented. will push to new PR and then supplement with more fixes.
Get following error on e2e mldeploy. Attaching models for e2e: e2e_ns_Models.zip
Exception in thread "ThreadPoolTaskExecutor-2" com.marklogic.client.FailedRequestException: Local message: /config/query write failed: Bad Request. Server Message: RESTAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: Operation results in invalid Options: XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate strict { $opt } -- Invalid node: Found text{"
..."} but expected () at fn:doc("")/search:options/search:constraint[1]/search:value/search:element/text() using schema "search.xsd"text{"
..."}()fn:doc("")/search:options/search:constraint[1]/search:value/search:element/text()"search.xsd"
at com.marklogic.client.impl.JerseyServices.putPostValueImpl(JerseyServices.java:3014)
at com.marklogic.client.impl.JerseyServices.putValue(JerseyServices.java:2865)
at com.marklogic.client.impl.QueryOptionsManagerImpl.writeOptions(QueryOptionsManagerImpl.java:158)
at com.marklogic.client.modulesloader.impl.DefaultModulesLoader$3.run(DefaultModulesLoader.java:522)
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)
Exception in thread "ThreadPoolTaskExecutor-1" com.marklogic.client.FailedRequestException: Local message: /config/query write failed: Bad Request. Server Message: RESTAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: Operation results in invalid Options: XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate strict { $opt } -- Invalid node: Found text{"
..."} but expected () at fn:doc("")/search:options/search:constraint[1]/search:value/search:element/text() using schema "search.xsd"text{"
..."}()fn:doc("")/search:options/search:constraint[1]/search:value/search:element/text()"search.xsd"
at com.marklogic.client.impl.JerseyServices.putPostValueImpl(JerseyServices.java:3014)
at com.marklogic.client.impl.JerseyServices.putValue(JerseyServices.java:2865)
at com.marklogic.client.impl.QueryOptionsManagerImpl.writeOptions(QueryOptionsManagerImpl.java:158)
at com.marklogic.client.modulesloader.impl.DefaultModulesLoader$3.run(DefaultModulesLoader.java:522)
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)
Please note that the model zip attached here is the one with namespaces. What we have now checked in e2e is the original model from 9.0-1 so mldeploy of e2e works. I wanted to have separate e2e tests for namespace. So if you generate artifacts with attached model and deploy you will see the error in the comment above.
how do you go about generating them?
do you sore the models anywhere in the source tree?
I'm finding that mlGenerateCode works great.
Ah, i think you use the gradle task i made, duh
So I was able to deploy the new sub project I made with models having namespaces in them. Didnt get the error I reported in comment earlier. Must be a carriage return somewhere as you suspected @grechaw. Shipping this issue.
Used model valid-ref.json in e2e to generate search options. On deploy got below validate error:
XDMP-VALIDATEMISSINGATTR: (err:XQDY0027) validate strict { es:search-options-generate(fn:doc("valid-ref.json")) } -- Missing required attribute: Found () but required (@name & @ns?) at /*:options/*:constraint[6]/*:range/*:element using schema "search.xsd"
The search:constraint block looks like this: