Hi, Asiri. The problem is ApplicationContext is not initialized. :) You need either: 1) add <listener> <listener-class>org.xwiki.plexus.XWikiPlexusServletContextListener</listener-class> </listener> to your web.xml (see web.xml in web/standard) OR 2) add containerInitializer.initializeApplicationContext(servletContext); in servlet container initialization. Asiri Rathnayake wrote:
The problem is Execution object is not completely initialized so it has no ExecutionContext.
AFAIK, Execution need to be initialized explicitly by ServletContainerInitializer or else. Look at XWikiAction#initializeContainerComponent So you need something similar before call XWiki.getXWiki(xwikiContext);
I did as you said and the situation has improved. But i'm getting the following exception now,
<dump> com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Wrapped Exception: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration at ...
-- Artem Melentyev