Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11477

Failed to access wiki when the descriptor is not stored in the object number 0 of the document

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      To reproduce:

      • in the main wiki descriptor, add an alias and remove the default alias added (or something like that, just make sure that the descriptor of the wiki is not object with number 0 but with number 1 or 2 or something, and that there is no object with number 0 of type XWikiServerClass)
        • I also had my server in domain based but I don't think it matters
      • restart the wiki
      • access the wiki, you will have the following error displayed on the screen and won't be able to access the wiki:
        root cause
        
        com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [<server url here>]
        	com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:519)
        	com.xpn.xwiki.XWiki.getXWiki(XWiki.java:468)
        	com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:173)
        	com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:149)
        	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
        	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
        	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        	com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115)
        	org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:126)
        	org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        	org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
        	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        	org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
        	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
        	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        
        root cause
        
        java.lang.NullPointerException
        	org.xwiki.wiki.internal.descriptor.builder.DefaultWikiDescriptorBuilder.extractWikiAlias(DefaultWikiDescriptorBuilder.java:156)
        	org.xwiki.wiki.internal.descriptor.builder.DefaultWikiDescriptorBuilder.extractWikiDescriptor(DefaultWikiDescriptorBuilder.java:142)
        	org.xwiki.wiki.internal.descriptor.builder.DefaultWikiDescriptorBuilder.buildDescriptorObject(DefaultWikiDescriptorBuilder.java:102)
        	org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.buildDescriptorFromDocument(DefaultWikiDescriptorManager.java:214)
        	org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:146)
        	org.xwiki.url.internal.standard.DefaultWikiReferenceExtractor.getWikiDescriptorByAlias(DefaultWikiReferenceExtractor.java:179)
        	org.xwiki.url.internal.standard.DefaultWikiReferenceExtractor.resolveDomainBasedWikiReference(DefaultWikiReferenceExtractor.java:126)
        	org.xwiki.url.internal.standard.DefaultWikiReferenceExtractor.extract(DefaultWikiReferenceExtractor.java:95)
        	org.xwiki.url.internal.standard.entity.ExtendedURLEntityResourceReferenceResolver.resolve(ExtendedURLEntityResourceReferenceResolver.java:92)
        	org.xwiki.url.internal.standard.entity.ExtendedURLEntityResourceReferenceResolver.resolve(ExtendedURLEntityResourceReferenceResolver.java:59)
        	org.xwiki.url.internal.standard.StandardURLResourceReferenceResolver.resolve(StandardURLResourceReferenceResolver.java:121)
        	org.xwiki.url.internal.standard.StandardURLResourceReferenceResolver.resolve(StandardURLResourceReferenceResolver.java:45)
        	org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:75)
        	org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:45)
        	com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:515)
        	com.xpn.xwiki.XWiki.getXWiki(XWiki.java:468)
        	com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:173)
        	com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:149)
        	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
        	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
        	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
        	org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
        	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
        	javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        	com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:115)
        	org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:126)
        	org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
        	org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
        	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        	org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)
        	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
        	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        

      Attachments

        Activity

          People

            vmassol Vincent Massol
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: