Re: [xwiki-users] Not able to read attachments from server thread

2014-11-13 Thread Thomas Mortagne
That's probably because you don't properly initialize your thread (initialize an ExecutionContext and stuff like this). You can use org.xwiki.context.concurrent.ExecutionContextRunnable to help with this. Also to get a proper XWikiContext it's usually better to use ProviderXWikiContext (either by

Re: [xwiki-users] Not able to read attachments from server thread

2014-11-12 Thread Thomas Mortagne
Could you copy the complete error, you should have a more detailed cause. On Wed, Nov 12, 2014 at 11:39 AM, Stefan Bernsdorf gruener.heinr...@web.de wrote: Hi, I created a Macro in xwiki. In this macro a server process is started that tries to read attachments. For this, I created a

Re: [xwiki-users] Not able to read attachments from server thread

2014-11-12 Thread Marius Dumitru Florea
Btw, you should take a look at the Job Module http://extensions.xwiki.org/xwiki/bin/view/Extension/Job+Module which provides a clean way to perform, in a background thread, tasks that access the XWiki model. Hope this helps, Marius On Wed, Nov 12, 2014 at 2:45 PM, Thomas Mortagne

Re: [xwiki-users] Not able to read attachments from server thread

2014-11-12 Thread Stefan Bernsdorf
Hi, the Job Module looks promising, however this is the stack: CONTENT IS NUL!com.xpn.xwiki.XWikiException: Error number 3231 in 3: Exc eption while loading attachment myseedfile.dgn of document microtest_oto.Templates_Test-Stefan at