Bug 200947 - startup failure - file access not allowed
startup failure - file access not allowed
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.0.1
PC Windows XP
: P3 (vote)
: 7.1
Assigned To: Jesse Glick
issues@projects
: RANDOM, THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-15 06:44 UTC by toben
Modified: 2011-08-16 13:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
error dialog (6.70 KB, image/png)
2011-08-15 06:45 UTC, toben
Details

Note You need to log in before you can comment on or make changes to this bug.
Description toben 2011-08-15 06:44:53 UTC
Nearly every time I start netbeans the following dialog is showing. This is a part of my log-file. How should I provide additional informations?

SEVERE [org.openide.util.Exceptions]

msg
msg
Caused: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot get shared access to MasterFileObject[D:\work\alkis\nasgui\nas.filetypes\nb-configuration.xml@135a4a0:13316bf,valid=true] (probably opened for writing).
	at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:118)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport.addResource(MutualExclusionSupport.java:100)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:166)
Caused: java.io.FileNotFoundException
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:193)
[catch] at org.netbeans.modules.maven.M2AuxilaryConfigImpl.doGetConfigurationFragment(M2AuxilaryConfigImpl.java:170)
	at org.netbeans.modules.maven.M2AuxilaryConfigImpl.getConfigurationFragment(M2AuxilaryConfigImpl.java:133)
	at org.netbeans.modules.maven.MavenProjectPropsImpl.readProperties(MavenProjectPropsImpl.java:215)
	at org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:103)
	at org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:89)
	at org.netbeans.modules.maven.classpath.BootClassPathImpl.findActivePlatform(BootClassPathImpl.java:134)
	at org.netbeans.modules.maven.classpath.ClassPathProviderImpl.getJavaPlatform(ClassPathProviderImpl.java:300)
	at org.netbeans.modules.maven.NbMavenProjectImpl.createSystemPropsForPropertyExpressions(NbMavenProjectImpl.java:332)
	at org.netbeans.modules.maven.api.PluginPropertyUtils.createEvaluator(PluginPropertyUtils.java:498)
	at org.netbeans.modules.maven.api.PluginPropertyUtils.getPluginProperty(PluginPropertyUtils.java:103)
	at org.netbeans.modules.maven.NbMavenProjectImpl.getScalaDirectory(NbMavenProjectImpl.java:757)
	at org.netbeans.modules.maven.NbMavenProjectImpl.getSourceRoots(NbMavenProjectImpl.java:687)
	at org.netbeans.modules.maven.classpath.ClassPathProviderImpl.getType(ClassPathProviderImpl.java:206)
	at org.netbeans.modules.maven.classpath.ClassPathProviderImpl.findClassPath(ClassPathProviderImpl.java:144)
	at org.netbeans.modules.csl.core.ProjectClassPathProvider.findClassPath(ProjectClassPathProvider.java:70)
	at org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPath.java:632)
	at org.netbeans.modules.parsing.impl.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:309)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
ALL [null]: Cannot get shared access to MasterFileObject[D:\work\alkis\nasgui\nas.filetypes\nb-configuration.xml@135a4a0:13316bf,valid=true] (probably opened for writing).
ALL [null]: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot get shared access to MasterFileObject[D:\work\alkis\nasgui\nas.filetypes\nb-configuration.xml@135a4a0:13316bf,valid=true] (probably opened for writing).


Thanks

Tobias
Comment 1 toben 2011-08-15 06:45:57 UTC
Created attachment 109972 [details]
error dialog
Comment 2 Jesse Glick 2011-08-15 15:52:49 UTC
No idea how to reproduce this. Seems like something is attempting to write to nb-configuration.xml during startup, but no module ought to be doing so. The contents of this file (together with general information about the project in question) might give a clue, but in general you may need to run the IDE in a debugger and set a breakpoint in M2AuxilaryConfigImpl in putConfigurationFragment (also removeConfigurationFragment). I can attempt to prevent M2ACI from simultaneously reading and writing the same file (only triggers a visible problem for Windows users), but I probably cannot verify any fix.
Comment 3 Jesse Glick 2011-08-15 16:04:37 UTC
Possibly fixed in core-main #b8e967a36f60.
Comment 4 Quality Engineering 2011-08-16 13:54:28 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/b8e967a36f60
User: Jesse Glick <jglick@netbeans.org>
Log: Possible fix of #200947: guard I/O access to nb-configuration.xml, and use recommended idioms for that.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo