From: Nick S. <nsi...@nu...> - 2021-05-28 16:58:40
|
Have you tried re-indexing your collections? The reason I suggest this is because I sometime run into perplexing situations where my queries are not working and I re-index and suddenly they query works. This just happened to me yesterday. I don't really have an explanation on why the collection needs re-indexing but it is happened enough time in the past that it is a technique I always remember to try if I am really confused why my query is not working. Nick On 5/28/21 4:30 AM, Jo Calder wrote: > Hi all, > > The following query produces no output > > xquery version "3.1"; > declare variable $collection-1-name := util:uuid(); > declare variable $collection-2-name := util:uuid(); > declare variable $collection-1-uri := "/db/" || $collection-1-name; > declare variable $sub-collection-name := "subcollection"; > declare variable $sub-collection-uri := $collection-1-uri || "/" || > $sub-collection-name; > declare variable $collection-2-uri := "/db/" || $collection-2-name; > declare variable $expected-sub-collection-uri := $collection-2-uri || > "/" || $sub-collection-name; > declare variable $resource-name := "test.xml"; > > declare function local:test() { > xmldb:create-collection("/db", $collection-1-name), > xmldb:create-collection($collection-1-uri, $sub-collection-name), > xmldb:store($sub-collection-uri, $resource-name, <test/>), > xmldb:rename($collection-1-uri, $collection-2-name), > xmldb:collection-available($expected-sub-collection-uri) > }; > > local:test() > > Furthermore, attempts to delete the resulting $collection-2-uri via > eXide > Manage gives a dialog "Delete Resource Error". The following > is shown in exist.log: > > 2021-05-28 09:17:15,670 [qtp79620878-30] ERROR (NativeBroker.java > [checkCollectionAncestorPermissions]:940) - Parent collection > /db/7cef2ea5-bfb6-42fc-af2e-a5bfb612fcc7 was null for collection > /db/7cef2ea5-bfb6-42fc-af2e-a5bfb612fcc7/subcollection > 2021-05-28 09:17:15,670 [qtp79620878-30] WARN > (TransactionManager.java [close]:409) - Transaction was not committed > or aborted, auto aborting! > 2021-05-28 09:17:15,670 [qtp79620878-30] ERROR (XQueryServlet.java > [process]:559) - null > java.lang.IllegalStateException: null > at > org.exist.storage.NativeBroker.checkCollectionAncestorPermissions(NativeBroker.java:941) > ~[exist-core-5.2.0.jar:5.2.0] > .... > The parent collection mentioned in the above log is collection-1 from > the above script. > > Install details are: > > eXist Version: 5.2.0 > eXist Build: 20200123133609 > Operating System: Linux 3.10.0-1062.12.1.el7.x86_64 amd64 [Red Hat 7] > Java Version: 1.8.0_242 > > Best regards, -- Jo > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open -- Nick Sincaglia President/Founder NueMeta, LLC Digital Media & Technology Phone: +1-630-303-7035 nsi...@nu... http://www.nuemeta.com Skype: nsincaglia |