Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8050999

com.sun.tools.xjc.XJCTask fails with NPE when run with JDK 1.8

XMLWordPrintable

      XJCTask is failing with NPE when called from ANT task. The stack trace example:
      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

            aefimov Aleksej Efimov
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: