This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 200910212001 ] [ JDK VERSION : 1.6.* ] I've run into a problem with pom file editing in 200910191401 and in beta. To put it simply, save stops working. It will work for some time then at some point I press ctrl-s to save a modified pom and nothing happens. The name of the pom file is emboldened in its tab, so the editor is aware that something has changed. Save is greyed out in the file menu. This doesn't happen all the time, but once it does it doesn't go away without a restart of the IDE (and obviously I lose my changes). I have seen this issue several times with 200910191401 and with 6.8 beta (200910212001).
Created attachment 89972 [details] var/log/messages.log for a session in which pom saving failed
nothing obvious in the log files, it happened to be once as we though. just started the IDE and manually edited the pom.xml file. no code generators or anything that touches the xam model. reassigning to editor for evaluation, FYI the pom files don't have their own loader/cloneableEditor, but are reusing the generic xml one.
Is the following exception "normal"? Also please check where it was catched ... INFO [org.netbeans.modules.maven.NbMavenProjectImpl]: Error on loading project /tmp/vcs-1256290953051/pom.xml org.apache.maven.project.InvalidProjectModelException: Failed to validate POM for project com.ft:ft-cmsController at /tmp/vcs-1256290953051/pom.xml at org.apache.maven.project.DefaultMavenProjectBuilder.validateModel(DefaultMavenProjectBuilder.java:1094) at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1048) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:812) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:504) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) at org.apache.maven.embedder.MavenEmbedder.readProject(MavenEmbedder.java:381) at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies_aroundBody0(MavenEmbedder.java:416) at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies_aroundBody1$advice(MavenEmbedder.java:304) at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies(MavenEmbedder.java:1) at org.netbeans.modules.maven.NbMavenProjectImpl.loadOriginalMavenProject(NbMavenProjectImpl.java:359) at org.netbeans.modules.maven.NbMavenProjectImpl.getOriginalMavenProject(NbMavenProjectImpl.java:332) at org.netbeans.modules.maven.api.NbMavenProject.getMavenProject(NbMavenProject.java:232) at org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:105) at org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:85) at org.netbeans.modules.maven.api.NbMavenProject.getPackagingType(NbMavenProject.java:290) at org.netbeans.modules.maven.apisupport.MavenApisupportLookupProvider$Provider.checkNbm(MavenApisupportLookupProvider.java:93) at org.netbeans.modules.maven.apisupport.MavenApisupportLookupProvider$Provider.<init>(MavenApisupportLookupProvider.java:81) at org.netbeans.modules.maven.apisupport.MavenApisupportLookupProvider.createAdditionalLookup(MavenApisupportLookupProvider.java:68) at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.doDelegate(LookupProviderSupport.java:184) at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.<init>(LookupProviderSupport.java:130) at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.<init>(LookupProviderSupport.java:118) at org.netbeans.spi.project.support.LookupProviderSupport.createCompositeLookup(LookupProviderSupport.java:89) at org.netbeans.modules.maven.NbMavenProjectImpl$LazyLookup.beforeLookup(NbMavenProjectImpl.java:844) at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:197) at org.netbeans.modules.projectapi.ProjectFileEncodingQueryImplementation.getEncoding(ProjectFileEncodingQueryImplementation.java:68) at org.netbeans.api.queries.FileEncodingQuery.getEncoding(FileEncodingQuery.java:91) at org.openide.text.DataEditorSupport.openDocument(DataEditorSupport.java:484) at org.netbeans.modules.versioning.diff.DiffSidebar.getText(DiffSidebar.java:967) at org.netbeans.modules.versioning.diff.DiffSidebar.getText(DiffSidebar.java:874) at org.netbeans.modules.versioning.diff.DiffSidebar.access$1200(DiffSidebar.java:99) at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.fetchOriginalContent(DiffSidebar.java:832) at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.computeDiff(DiffSidebar.java:803) [catch] at org.netbeans.modules.versioning.diff.DiffSidebar$RefreshDiffTask.run(DiffSidebar.java:793) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084) My question is whether the org.openide.text.DataEditorSupport.openDocument can survive it without further consequences. If you think so please re-assign to openide/text (why on earth have you used editor/UI?) for further evaluation. I am marking as incomplete for now as well.
For the record: editor module has rarely anything to do with the Save action. It is simply asked to serialize data to a stream when the action is invoked. One of few things that is somewhat related to saving is Undo/Redo. I was trying to reproduce and happened to me twice on an older build, but not since then (on neither old or new build). I did not use Undo/Redo. I did not hear any report of similar problems with Java files (or any kind of files other than pom.xml), so I would suspect this is related to the XMLDataObject/TextEditorSupport (xml module) or Maven. Probably the investigation should start there, although the actual problem can of course be somewhere else.
the exception is reasonably normal, AFAIK it is just logged in org.netbeans.modules.maven.NbMavenProjectImpl.loadOriginalMavenProject, and if it occurs (or any other exception for that matter) a fallback dummy maven project is loaded and user is notified in the UI that the project cannot load properly. btw: the stacktrace is coming from vcs' diff and related to a temporary file, not the file user for supposedly editing.. reassigning to xml/code then for evaluation.
Alex, please take a look. Probably it's also maven plugin issue.
*** Issue 175630 has been marked as a duplicate of this issue. ***
it seems to be closely related to issue 175750. The maven.grammar's class org.netbeans.modules.maven.navigator.POMModelPanel.select() method call reasonably correct code to open the editor tab. However it opens a new tab, with it's own document (eg. changing one of the editor content and saving it, will not have it appear in the other one). The other editor gets opened via the Edit action on xml file's popup. Reassigning to platform/text for evaluation
Is there any way how to reproduce this? Can you get latest daily build and test with it? If it happens more often for you I could add some logging.
It looks like dupl of #175750. I will wait for fix of #175750 and then ask for verification.
*** This issue has been marked as a duplicate of 175750 ***