Hi Thomas,
On Thu, Jun 19, 2008 at 1:09 PM, Thomas Mortagne <thomas.mortagne(a)xwiki.com>
wrote:
On Thu, Jun 19, 2008 at 4:32 AM, Asiri Rathnayake
<asiri.rathnayake(a)gmail.com> wrote:
Hi Thomas,
Sorry for the late reply, i just woke up :)
This is ludovic's original code,
<code>
context = Utils.prepareContext("", request, response, engine);
context.setMode(XWikiContext.MODE_GWT);
context.setDatabase("xwiki");
XWiki xwiki = XWiki.getXWiki(context);
</code>
So yes, Utils.prepareContext() is used but XWiki.getXWiki() fails.
I just committed a throw in Utils.getComponent when component manager
has not been initialized, that way we will be sure it's the problem or
not.
Thanks.
- Asiri
On Thu, Jun 19, 2008 at 2:16 AM, Thomas Mortagne <
thomas.mortagne(a)xwiki.com>
wrote:
> Asiri, is webdav servlet use Utils.prepareContext to create/prepare
> the context ? (the Utils's ComponentManager is initialized in it)
>
> On Wed, Jun 18, 2008 at 10:43 PM, Thomas Mortagne
> <thomas.mortagne(a)xwiki.com> wrote:
> > ok, I think the problem is that when the first connection is webdav
> > ComponentManager is not initialized in Utils
> >
> > On Wed, Jun 18, 2008 at 10:28 PM, Thomas Mortagne
> > <thomas.mortagne(a)xwiki.com> wrote:
> >> Also I just fixed a build bug : cache was not built when building
from
> /trunks
> >>
> >> On Wed, Jun 18, 2008 at 10:25 PM, Thomas Mortagne
> >> <thomas.mortagne(a)xwiki.com> wrote:
> >>> Hi,
> >>>
> >>> This error append when you try to use cache component before
> >>> ComponentManager initialization, it's not really related to cache
> >>> itself.
> >>>
> >>> How do you reproduce this ? Is it in a unit test ? I don't have any
> >>> problem in virtual or non virtual mode when using xwiki in
standalone
> >>> or from Eclipse....
> >>>
> >>> On Wed, Jun 18, 2008 at 9:11 PM, Asiri Rathnayake
> >>> <asiri.rathnayake(a)gmail.com> wrote:
> >>>> Hi All,
> >>>>
> >>>> I cannot test xwiki-webdav anymore because XWikiCacheStore throws a
> null
> >>>> pointer exception that i cannot figure out. I think this is
introduced
> by a
> >>>> recent commit, please help me with this. Following is the
exception,
> >>>>
> >>>> <dump>
> >>>> java.lang.NullPointerException
> >>>> at
> >>>>
com.xpn.xwiki.store.XWikiCacheStore.initCache(XWikiCacheStore.java:95)
> >>>> at
> >>>>
com.xpn.xwiki.store.XWikiCacheStore.initCache(XWikiCacheStore.java:80)
> >>>> at
>>
>>>>
com.xpn.xwiki.store.XWikiCacheStore.<init>(XWikiCacheStore.java:62)
>> >>>> at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:675)
>> >>>> at com.xpn.xwiki.XWiki.<init>(XWiki.java:652)
>> >>>> at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:312)
>> >>>> at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:383)
> >>>> at
> >>>>
>>
com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.getXWikiContext(XWikiDavResourceImpl.java:350)
> >>>> at
> >>>>
>>
com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.<init>(XWikiDavResourceImpl.java:205)
> >>>> at
> >>>>
>>
com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:105)
> >>>> at
> >>>>
>>
com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:69)
> >>>> at
> >>>>
>>
com.xpn.xwiki.plugin.webdav.XWikiDavServlet.service(XWikiDavServlet.java:351)
> >>>> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> >>>> at
> >>>>
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> >>>> at
> >>>>
>>
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)
> >>>> at
> >>>>
>>
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:219)
> >>>> at
> >>>>
>>
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >>>> at
> >>>>
>>
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:738)
> >>>> at
> >>>>
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> >>>> at
> >>>>
>>
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
> >>>> at
> >>>>
>>
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113)
> >>>> at
> >>>>
>>
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>> >>>> at org.mortbay.jetty.Server.handle(Server.java:325)
> >>>> at
> >>>>
>>
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
> >>>> at
> >>>>
>>
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:859)
> >>>> at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> >>>> at
>>
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >>>> at
>>
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:391)
> >>>> at
> >>>>
>>
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> >>>> at
> >>>>
>>
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
> >>>> </dump>
> >>>>
> >>>> In XWikiCacheStore.initCache() method,
> >>>>
> >>>> CacheFactory cacheFactory = context.getWiki().getCacheFactory();
> >>>>
> >>>> here, cacheFactory has become null.
> >>>>
> >>>> I've only found this problem and currently looking into it, if
anyone
can
>>> help me get over this quickly it
would be a big help.
>>>
>>> Thanks.
>>>
>>> - Asiri
>>> _______________________________________________
>>> devs mailing list
>>> devs(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/devs
>>>
>>
>>
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Thomas Mortagne
>
--
Thomas Mortagne
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs