[xwiki-devs] Need help with WebDAV Support.

Ludovic Dubost ludovic at xwiki.org
Wed Apr 2 22:23:02 CEST 2008


This is new code in XWiki 1.3+
Just add one line to test for the NULL and not put it in the map

Ludovic

Asiri Rathnayake wrote:
> Hi Ludovic,
>
> I've been working on assembling a servlet using your webdav code, xwiki-core
> and other relevant dependencies. Although i could deploy the WebDAV servlet,
> I have few things I can't get pass,
>
> * What do I need to do so that once deployed the webdav servlet will use an
> instance of hsqldb ( like the stand-alone xwiki installation ) ?
>
> * Currently when I make a request to the servlet, I get the following error,
>
> 2008-04-02 20:21:19,597 [http://localhost:8080/DAVServer/]
> [http-8080-Processor24] ERROR [/DAVServer].[DAVServlet]       -
> Servlet.service() for servlet DAVServlet threw exception
> java.lang.NullPointerException
>     at java.util.Hashtable.put(Hashtable.java:396)
>     at com.xpn.xwiki.web.Utils.prepareContext(Utils.java:274)
>     at
> com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.getXWikiContext(XWikiDavResourceImpl.java:317)
>     at
> com.xpn.xwiki.plugin.webdav.XWikiDavResourceImpl.<init>(XWikiDavResourceImpl.java:180)
>     at
> com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:96)
>     at
> com.xpn.xwiki.plugin.webdav.XWikiResourceFactoryImpl.createResource(XWikiResourceFactoryImpl.java:63)
>     at
> com.xpn.xwiki.plugin.webdav.XWikiDavServlet.service(XWikiDavServlet.java:340)
>
> Tracking down reveals that the code in Utils,
>
> ComponentManager componentManager =
>             (ComponentManager)
> engine_context.getAttribute(ComponentManager.class.getName());
>         context.put(ComponentManager.class.getName(), componentManager);
>
> Is throwing a null-pointer exception where componentManager is NULL. I
> believe this has something to with plexus, could tell me how to overcome
> this ?
>
> I'm sort of stuck at this point, any help is really appreciated.
>
> Btw, Ludovic, how were you able to test your code ?
>
> Thanks a lot.
>
> - Asiri
> _______________________________________________
> devs mailing list
> devs at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
>   


-- 
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost



More information about the devs mailing list