Bug 38149

Summary: SPECjvm2008 xml.validation fails with NullPointerException
Product: classpath Reporter: Andrew John Hughes <gnu_andrew>
Component: xmlAssignee: chris burdess <dog>
Status: UNCONFIRMED ---    
Severity: normal CC: bug-classpath
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 38141    

Description Andrew John Hughes 2008-11-16 02:21:20 UTC
java.lang.NullPointerException
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service$Loader2.getResources(DatatypeLibraryLoader.java:151)
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader$Service.<init>(DatatypeLibraryLoader.java:172)
   at org.relaxng.datatype.helpers.DatatypeLibraryLoader.<init>(DatatypeLibraryLoader.java:57)
   at gnu.xml.validation.xmlschema.XMLSchemaBuilder.<init>(XMLSchemaBuilder.java:69)
   at gnu.xml.validation.xmlschema.XMLSchemaSchemaFactory.newSchema(XMLSchemaSchemaFactory.java:113)
   at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:225)
   at spec.benchmarks.xml.validation.Main.setupValidators(Main.java:112)
   at spec.benchmarks.xml.validation.Main.setupBenchmark(Main.java:95)
   at java.lang.reflect.VMMethod.invoke(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:331)
   at spec.harness.ProgramRunner.invokeBmSetupBenchmark(ProgramRunner.java:183)
   at spec.harness.ProgramRunner.runBenchmark(ProgramRunner.java:301)
   at spec.harness.ProgramRunner.run(ProgramRunner.java:98)
   at java.lang.VMThread.run(VMThread.java:120)
Comment 1 Mark Wielaard 2008-11-16 15:50:29 UTC
Code is wrong. In DatatypeLibraryLoader.java Loader2 does a direct cl.getResources, but if the classloader is null then you need to use the bootstrap classloader through ClassLoader.getSystemResources(). This is what Loader (in the same file) does.