java.lang.NullPointerException

XWiki.org JIRA | CalebJamesDeLisle | 7 years ago
  1. 0

    As of revision 27190, the parser breaks when a document is saved containing an empty html macro. This bug does not exist in 2.2 This {noformat} {{html}} {{/html}} {noformat} Causes this: {noformat} Wrapped Exception: java.lang.NullPointerException at com.xpn.xwiki.doc.XWikiDocument.getXDOM(XWikiDocument.java:6755) at com.xpn.xwiki.doc.XWikiDocument.getUniqueLinkedPages(XWikiDocument.java:3933) at com.xpn.xwiki.doc.XWikiDocument.getUniqueWikiLinkedPages(XWikiDocument.java:3812) at com.xpn.xwiki.store.XWikiHibernateStore.saveLinks(XWikiHibernateStore.java:1913) at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:620) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:182) at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:175) at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1343) {noformat} If the html macro is wrapped in a velocity macro, then the SaveAndContinue button works and the page can be viewed as normal but the SaveAndView button makes the page not render correctly even after a refresh (bad XDOM?) This: {noformat} {{velocity}} {{html}} {{/html}} {{/velocity}} {noformat} Causes this: {noformat} Caused by: org.xwiki.rendering.parser.ParseException: Failed to parse input source at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:136) at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:97) at org.xwiki.rendering.macro.script.AbstractScriptMacro.parseSourceSyntax(AbstractScriptMacro.java:381) ... 91 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881) at java.lang.StringBuffer.substring(StringBuffer.java:416) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.normalizeMacroContent(XWikiScanner.java:84) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.macro(XWikiScanner.java:1272) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.macroBlock(XWikiScanner.java:1195) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.docElements(XWikiScanner.java:698) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.doParse(XWikiScanner.java:671) at org.wikimodel.wem.xwiki.xwiki20.javacc.XWikiScanner.parse(XWikiScanner.java:48) at org.wikimodel.wem.xwiki.xwiki20.XWikiParser.parse(XWikiParser.java:43) at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:134) ... 93 more {noformat}

    XWiki.org JIRA | 7 years ago | CalebJamesDeLisle
    java.lang.NullPointerException
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.xpn.xwiki.doc.XWikiDocument.getXDOM()
    2. com.xpn.xwiki
      XWiki.saveDocument
      1. com.xpn.xwiki.doc.XWikiDocument.getXDOM(XWikiDocument.java:6755)
      2. com.xpn.xwiki.doc.XWikiDocument.getUniqueLinkedPages(XWikiDocument.java:3933)
      3. com.xpn.xwiki.doc.XWikiDocument.getUniqueWikiLinkedPages(XWikiDocument.java:3812)
      4. com.xpn.xwiki.store.XWikiHibernateStore.saveLinks(XWikiHibernateStore.java:1913)
      5. com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:620)
      6. com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:182)
      7. com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:175)
      8. com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1343)
      8 frames