Exception when trying to give me an exception

Seems I have a bug in one of my module’s files, but it cannot tell me where… because it fails on formatting the error message. Any idea if this is common? (XP 5.1.0 distro running on Windows 7 64-bit)

09:38:10.677 ERROR c.e.x.a.i.r.e.JsonExceptionMapper - NullPointerException
java.lang.NullPointerException: null
    at java.text.MessageFormat.applyPattern(MessageFormat.java:436) ~[na:1.8.0_40]
    at java.text.MessageFormat.<init>(MessageFormat.java:362) ~[na:1.8.0_40]
    at java.text.MessageFormat.format(MessageFormat.java:840) ~[na:1.8.0_40]
    at com.enonic.xp.exception.BaseException.<init>(BaseException.java:28) ~[na:na]
    at com.enonic.xp.exception.BaseException.<init>(BaseException.java:23) ~[na:na]
    at com.enonic.xp.xml.XmlException.<init>(XmlException.java:13) ~[na:na]
    at com.enonic.xp.xml.parser.XmlObjectParser.parse(XmlObjectParser.java:85) ~[na:na]
    at com.enonic.xp.core.impl.content.page.region.AbstractGetPartDescriptorCommand.parseXml(AbstractGetPartDescriptorCommand.java:55) ~[na:na]

Oh, right. We will make the error-message formatting more robust by handling null’s. I see that we should also force XSD validation on the XML file parsing. If this where in place it would be easier to find out what’s going on.

Thanks for the bug report. I have added some improvements to our issue-tracker.

1 Like