[xwiki-devs] Need help with WebDAV Support.
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
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
On Apr 2, 2008, at 10:23 PM, Ludovic Dubost wrote:
This is new code in XWiki 1.3+ Just add one line to test for the NULL and not put it in the map
Well this is a quick and probably non-working workaround. The correct way is to initialize Plexus in XMLRPC mode too. Right now it's initialized in Servlet mode only I think. For example if you need to do any velocity stuff (which is the case in the XMLRPC API I believe when retrieving a page's rendered content) it won't work since Velocity rendering is now done in a component. I guess I'll have to look into this to do a proper Plexus initialization in XMLRPC mode. -Vincent
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
At this point it does work for the GWT RPC. Now it's sure as there are more components all XWiki function rely on we will need to have it really working The case for Asiri is not for XMLRPC but for WebDAV which should not make use of velocity. Ludovic Vincent Massol wrote:
On Apr 2, 2008, at 10:23 PM, Ludovic Dubost wrote:
This is new code in XWiki 1.3+ Just add one line to test for the NULL and not put it in the map
Well this is a quick and probably non-working workaround. The correct way is to initialize Plexus in XMLRPC mode too. Right now it's initialized in Servlet mode only I think.
For example if you need to do any velocity stuff (which is the case in the XMLRPC API I believe when retrieving a page's rendered content) it won't work since Velocity rendering is now done in a component.
I guess I'll have to look into this to do a proper Plexus initialization in XMLRPC mode.
-Vincent
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
participants (3)
-
Asiri Rathnayake -
Ludovic Dubost -
Vincent Massol