Hello everyone,
as i mentioned here , i am trying to delete Documents from java class. i thought with querymanager i can have an instance of Document class, and i can call the delete() function.
But unfortunately with querymanager i have XwikiDocument. and for haveing a Document i need to hace the XwikiContext.
i tried multiple ways of having an instance of XwikiContext and i could make a Document with it. But as i call the Delete function i have this error:
Caused by: com.xpn.xwiki.XWikiException: Error number 3204 in 3: Impossible to delete document xwiki:parent.WebHome if it is not loaded
at com.xpn.xwiki.store.XWikiHibernateStore.deleteXWikiDoc(XWikiHibernateStore.java:1208)
what should i do? how can i load the Document or how can i delete a Document with its XwikiDocument.
I spent days to acces querymanager but i couldnt and today with the Help of this Forum i could make it. as im under Time pressure i ask my questions before i spend days on it whithout having any succes.
Thank you for helping me