[xwiki-users] WYSIWYG Editor : error when inserting a macro in a page

2009-11-24 Thread PERINAUD Christophe
Hello,

When we try to insert a macro when editing a page, we have the message below 
displayed in the popup window (the HTML tags are also displayed).
We work with virtual wikis, the problem exists in the main wiki and all virtual 
wikis.

*
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
titleError 500 INTERNAL_SERVER_ERROR/title
/head
bodyh2HTTP ERROR 500/h2
pProblem accessing /xwiki/resources/js/xwiki/wysiwyg/xwe/MacroService.gwtrpc. 
Reason:
preINTERNAL_SERVER_ERROR/pre/ph3Caused 
by:/h3prejava.lang.NullPointerException
 at 
com.xpn.xwiki.doc.DefaultDocumentNameFactory.getContext(DefaultDocumentNameFactory.java:188)
 at 
com.xpn.xwiki.doc.DefaultDocumentNameFactory.getDefaultWikiName(DefaultDocumentNameFactory.java:156)
 at 
com.xpn.xwiki.doc.DefaultDocumentNameFactory.createDocumentName(DefaultDocumentNameFactory.java:112)
 at com.xpn.xwiki.doc.XWikiDocument.setFullName(XWikiDocument.java:3741)
 at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1407)
 at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:464)
 at 
com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.initializeXWikiContext(XWikiContextInitializationFilter.java:115)
 at 
com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:80)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at 
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at 
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
 at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
 at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
 at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
 at org.mortbay.jetty.Server.handle(Server.java:326)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
 at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
 at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
 at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
/pre
hr /ismallPowered by Jetty:///small/ibr/

br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/
br/

/body
/html
*

Thank you

Christophe PĂ©rinaud
Windows Server 2003 SP2 in a VMWare instance
Oracle 10g
Java 1.6.0_12
Xwiki 2.0.3 from the pack Jetty/HSQL




This e-mail is intended only for the addressee named above. It does not bind 
the sender, except in the case of an existing written convention with the 
addressee. This e-mail may contain material that is confidential and privileged 
for the sole use of 

Re: [xwiki-users] WYSIWYG Editor : error when inserting a macro in a page

2009-11-24 Thread Marius Dumitru Florea
Hi,

PERINAUD Christophe wrote:
 Hello,
 
 When we try to insert a macro when editing a page, we have the message below 
 displayed in the popup window (the HTML tags are also displayed).
 We work with virtual wikis, the problem exists in the main wiki and all 
 virtual wikis.
 
 *
 html
 head
 meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
 titleError 500 INTERNAL_SERVER_ERROR/title
 /head
 bodyh2HTTP ERROR 500/h2

 pProblem accessing 
 /xwiki/resources/js/xwiki/wysiwyg/xwe/MacroService.gwtrpc. Reason:
 preINTERNAL_SERVER_ERROR/pre/ph3Caused 
 by:/h3prejava.lang.NullPointerException
  at 
 com.xpn.xwiki.doc.DefaultDocumentNameFactory.getContext(DefaultDocumentNameFactory.java:188)
  at 
 com.xpn.xwiki.doc.DefaultDocumentNameFactory.getDefaultWikiName(DefaultDocumentNameFactory.java:156)
  at 
 com.xpn.xwiki.doc.DefaultDocumentNameFactory.createDocumentName(DefaultDocumentNameFactory.java:112)
  at com.xpn.xwiki.doc.XWikiDocument.setFullName(XWikiDocument.java:3741)
  at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1407)
  at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:464)
  at 
 com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.initializeXWikiContext(XWikiContextInitializationFilter.java:115)

I think the problem is that XWiki#getXWiki(XWikiContext) is called 
before initializing the container component. It seems that in a 
multiwiki environment this call requires the XWiki context to be present 
on the execution context. I've fixed this in revision 25082 ( 
http://lists.xwiki.org/pipermail/notifications/2009-November/065903.html 
) which was released in 2.1M1 and will be released soon in 2.0.4.

Macro insertion/editing seems to be busted in 2.0.3 on a multiwiki 
environment. I'm really sorry about this.. Can you try 2.1M1 to confirm 
this issue is not present anymore? Thanks.

Marius

  at 
 com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:80)
  at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
  at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at 
 com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
  at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at 
 com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
  at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at 
 com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
  at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
  at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
  at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
  at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:326)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
  at 
 org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
  at 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
  at 
 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
 /pre
 hr /ismallPowered by Jetty:///small/ibr/  
   
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/
 br/