The problem was due to missing infoset augmentations when document handler's startGeneralEntity/endGeneralEntity were called. The fix therefore is simply add the arguments.
webrev: http://cr.openjdk.java.net/~joehw/jdk8/8000172/webrev/ Please review. Thanks, Joe