Details
-
Bug
-
Resolution: Fixed
-
Minor
-
1.0 B5
-
None
Description
When importing a XAR, each document is loaded and saved. During the save XWiki renders the pages in order for the rendering process to parse links in the pages so that they can be saved as backlinks. During this process there's a NPE on some documents. This the kind of error we get:
15:16:18,925 DEBUG P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki Package:installDocument:503 - Package installing document Admin.Stats 15:16:18,990 DEBUG P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki DocumentInfo:testInstall:105 - Package test install document Admin.Stats 15:16:18,995 DEBUG P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki DocumentInfo:testInstall:135 - Package test install document Admin.Stats result 1 15:16:19,006 WARN P1-19 http://localhost:8080/xwiki/bin/import/XWiki/Import?editor=import&space=XWiki RegexTokenFilter:filter:97 - <span class="error">Exception</span>: com.xpn.xwiki.render.filter.MacroFilter@b11398 java.lang.NullPointerException at org.radeox.macro.parameter.BaseMacroParameter.insertValue(BaseMacroParameter.java:142) at org.radeox.macro.parameter.BaseMacroParameter.split(BaseMacroParameter.java:127) at org.radeox.macro.parameter.BaseMacroParameter.setParams(BaseMacroParameter.java:58) at org.radeox.filter.MacroFilter.handleMatch(MacroFilter.java:100) at org.radeox.filter.regex.RegexTokenFilter$1.handleMatch(RegexTokenFilter.java:91) at org.radeox.regex.JdkMatcher.substitute(JdkMatcher.java:48) at org.radeox.filter.regex.RegexTokenFilter.filter(RegexTokenFilter.java:89) at org.radeox.filter.FilterPipe.filter(FilterPipe.java:169) at org.radeox.engine.BaseRenderEngine.render(BaseRenderEngine.java:108) at com.xpn.xwiki.render.XWikiRadeoxRenderer.render(XWikiRadeoxRenderer.java:70) at com.xpn.xwiki.store.XWikiHibernateStore.saveLinks(XWikiHibernateStore.java:1459) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:305) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:100) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:94) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:891) at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:547) at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:488) at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:191) at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:90) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:150)
This needs to be fixed because:
1) it's an error
2) it means backlinks are not saved properly for the documents in error which in turn means that if a rename is done later on, it might miss some links to rename.