Error formatting macro: pagetree: java.lang.NullPointerException