Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6375

NullPointerException when pom.xml has incomplete XML tag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.2, 3.5.3
    • 3.6.2
    • POM
    • None

    Description

      Test case is a pom.xml with an incomplete XML tag. 

      $ echo -n "<p" > pom.xml # No newlines
      $ mvn
      org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:122)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: java.lang.NullPointerException
      	at org.codehaus.plexus.util.xml.pull.MXParser.fillBuf(MXParser.java:3054)
      	at org.codehaus.plexus.util.xml.pull.MXParser.more(MXParser.java:3080)
      	at org.codehaus.plexus.util.xml.pull.MXParser.parseStartTag(MXParser.java:1776)
      	at org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1517)
      	at org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1436)
      	at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131)
      	at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4399)
      	at org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:598)
      	at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:105)
      	at org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:82)
      	at org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81)
      	at org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:535)
      	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:275)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:429)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:398)
      	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:361)
      	at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:400)
      	at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:391)
      	at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:78)
      	at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:511)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:221)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)

       

      Bug was found automatically by JQF.

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              rohanpadhye Rohan Padhye
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: