[ https://issues.apache.org/jira/browse/NETBEANS-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833035#comment-16833035 ]
Vlad Palnik commented on NETBEANS-2499: --------------------------------------- Exception caused my malformed xml file. I was able to reproduce the problem with 8.2 so the bug has been around for a while. Fix: I was not able to locate the xml validator used by NetBeans but it should throw a ModelBuildingException and display an Open Project Dialog with Project Problems message and Resolve Problems button > showing error. Just like opening a project with a pom full of rubbish. > Unable to open Maven project > ---------------------------- > > Key: NETBEANS-2499 > URL: https://issues.apache.org/jira/browse/NETBEANS-2499 > Project: NetBeans > Issue Type: Bug > Components: projects - Maven > Affects Versions: 11.0 > Environment: Product Version: Apache NetBeans IDE 11.0 (Build > incubator-netbeans-release-404-on-20190319) > Java: 12.0.1; OpenJDK 64-Bit Server VM 12.0.1+12 > Runtime: OpenJDK Runtime Environment 12.0.1+12 > System: Windows 10 version 10.0 running on amd64; UTF-8; en_GB (nb) > Reporter: Anthony Vanelverdinghe > Priority: Major > Attachments: pom.xml > > > To reproduce: create a folder "nbissue", add the attached pom.xml to it, and > try to open it as a Maven project in NetBeans. > NetBeans will give an unexpected exception and a stacktrace like below. Note > that there are several possible modifications that will make NetBeans open > the pom.xml (e.g. deleting line 115 `<?m2e ignore?>`, deleting the large > comment block, ...) Also note the pom is valid as it is, and everything works > fine when using Maven (3.6.1 in my case) from the command-line. > java.lang.ArrayIndexOutOfBoundsException: Index 8442 out of bounds for length > 8192 > at org.codehaus.plexus.util.xml.pull.MXParser.parsePI(MXParser.java:2502) > at > org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1283) > at org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1131) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.nextTag(MavenXpp3ReaderEx.java:568) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parsePluginExecution(MavenXpp3ReaderEx.java:3302) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parsePlugin(MavenXpp3ReaderEx.java:3097) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseBuild(MavenXpp3ReaderEx.java:1025) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.parseModel(MavenXpp3ReaderEx.java:2550) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:4388) > at > org.apache.maven.model.io.xpp3.MavenXpp3ReaderEx.read(MavenXpp3ReaderEx.java:598) > at > org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:113) > at > org.apache.maven.model.io.DefaultModelReader.read(DefaultModelReader.java:86) > at > org.apache.maven.model.building.DefaultModelProcessor.read(DefaultModelProcessor.java:81) > at > org.apache.maven.model.building.DefaultModelBuilder.readModel(DefaultModelBuilder.java:533) > at > org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:273) > at > org.netbeans.modules.maven.embedder.impl.NBModelBuilder.build(NBModelBuilder.java:53) > at > org.netbeans.modules.maven.embedder.MavenEmbedder.executeModelBuilder(MavenEmbedder.java:447) > at > org.netbeans.modules.maven.NbMavenProjectImpl.getRawModel(NbMavenProjectImpl.java:192) > at > org.netbeans.modules.maven.api.NbMavenProject.getRawModel(NbMavenProject.java:347) > at > org.netbeans.modules.maven.MavenProjectPropsImpl.lambda$get$0(MavenProjectPropsImpl.java:93) > at > org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(DefaultMutexImplementation.java:188) > at org.openide.util.Mutex.readAccess(Mutex.java:193) > at > org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:78) > at > org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:74) > at > org.netbeans.modules.maven.MavenProjectPropsImpl$PackagingProviderImpl.packaging(MavenProjectPropsImpl.java:304) > at > org.netbeans.modules.maven.api.NbMavenProject.getPackagingType(NbMavenProject.java:334) > at > org.netbeans.modules.maven.NbMavenProjectImpl$PackagingTypeDependentLookup.check(NbMavenProjectImpl.java:829) > at > org.netbeans.modules.maven.NbMavenProjectImpl$PackagingTypeDependentLookup.<init>(NbMavenProjectImpl.java:819) > at > org.netbeans.modules.maven.NbMavenProjectImpl.<init>(NbMavenProjectImpl.java:245) > at > org.netbeans.modules.maven.NbMavenProjectFactory.loadProject(NbMavenProjectFactory.java:95) > at > org.netbeans.modules.projectapi.nb.NbProjectManager.createProject(NbProjectManager.java:376) > at > org.netbeans.modules.projectapi.nb.NbProjectManager.access$300(NbProjectManager.java:69) > at > org.netbeans.modules.projectapi.nb.NbProjectManager$2.run(NbProjectManager.java:289) > at > org.netbeans.modules.projectapi.nb.NbProjectManager$2.run(NbProjectManager.java:218) > at > org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(DefaultMutexImplementation.java:188) > at org.openide.util.Mutex.readAccess(Mutex.java:225) > at > org.netbeans.modules.projectapi.nb.NbProjectManager.findProject(NbProjectManager.java:218) > at > org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:142) > at > org.netbeans.modules.project.ui.OpenProjectList.fileToProject(OpenProjectList.java:1209) > at > org.netbeans.modules.project.ui.actions.OpenProject$1.run(OpenProject.java:125) > at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) > at > org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) > [catch] at > org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists