JDK-8029837 : NPE seen in XMLDocumentFragmentScannerImpl.setProperty since 7u40b33
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 7u45
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-12-09
  • Updated: 2015-01-21
  • Resolved: 2014-07-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8 JDK 9
6u91Fixed 7u72Fixed 8u20Fixed 9 b25Fixed
Related Reports
Duplicate :  
Description
 

BUILD FAILED
Below stack trace is from 7u45 b18.
        //JAXP 1.5 properties
        if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER))
            {
            XMLSecurityPropertyManager spm =
(XMLSecurityPropertyManager)value;
-->line 776 fAccessExternalDTD =
spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
            }
           
value variable passed in to setProperty is null.
/root/tiberio/test/build.xml:18: java.lang.NullPointerException
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.jav

a:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.NullPointerException
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.setProp

erty(XMLDocumentFragmentScannerImpl.java:776)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setProperty(XML

DocumentScannerImpl.java:448)
at
com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.setPropert

y(SchemaParsingConfig.java:492)
at
com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.setProperty(Sc

hemaDOMParser.java:503)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reset(XSDHand

ler.java:3594)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.reset(XMLSchemaLoad

er.java:1068)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSche

maLoader.java:561)
at
com.sun.org.apache.xerces.internal.parsers.XMLGrammarPreparser.preparseGrammar

(XMLGrammarPreparser.java:205)
at
com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(Schema

ConstraintChecker.java:78)
at com.sun.tools.xjc.GrammarLoader.loadXMLSchema(GrammarLoader.java:330)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:127)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:76)
at com.sun.tools.xjc.XJCTask._doXJC(XJCTask.java:358)
at com.sun.tools.xjc.XJCTask.doXJC(XJCTask.java:307)
at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:247)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
... 10 more


Comments
Test passed
2014-12-25

SQE OK to have this fix in JDK6 CPU15_01
2014-10-29

awaiting fix verification from submitter
2014-04-02

It seems to me an old version of JAXB/xjc tool is on the stack. com.sun.tools.xjc.GrammarLoader, or GrammarLoader.java for example, doesn't exist in JDK7/jaxws. The issue was that GrammarLoader.java used SchemaConstraintChecker that called into JAXP internal classes directly. XMLSecurityPropertyManager was therefore not initialized properly. SchemaConstraintChecker.java in JDK7 has been changed to use SchemaFactory. So I would suggest that while updating to 7u40, the xjc tool should also be updated to a newer version that's compatible with 7u40.
2013-12-09