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.
16 duplicates so far ... Build: NetBeans IDE 6.5 RC1 (Build 200810171318) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33 OS: Windows XP, 5.1, x86 User comments: attempting to remove bad/old project reference from project library run jar list. STACKTRACE: (first 10 lines) java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$.run(GeneratedFilesHelper.java:559) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$.run(GeneratedFilesHelper.java:557) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:556) at org.netbeans.modules.java.jseproject.ui.customizer.JSEProjectProperties.checkModified(JSEProjectProperties.java:443) at org.netbeans.modules.java.jseproject.ui.customizer.CustomizerProviderImpl$OptionListener.actionPerformed(CustomizerProviderImpl.java:176) at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener$.run(CustomizerDialog.java:213) at org.openide.util.Mutex.writeAccess(Mutex.java:394) at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener.actionPerformed(CustomizerDialog.java:211) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:0)
Build: NetBeans IDE Dev (Build 200902231401) VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04 OS: Windows XP, 5.1, x86 User Comments: web project reopened Stacktrace: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:579) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:576) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:576) at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:855) at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:81)
Created attachment 77480 [details] stacktrace
Build: NetBeans IDE Dev (Build 200904070200) VM: Java HotSpot(TM) Client VM, 1.6.0-b105, Java(TM) SE Runtime Environment, 1.6.0-b105 OS: Windows XP, 5.1, x86 User Comments: Attempting to enable compile on save in project Stacktrace: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:579) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:576) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:576) at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties.save(J2SEProjectProperties.java:402) at org.netbeans.modules.java.j2seproject.ui.customizer.CustomizerProviderImpl$StoreListener.actionPerformed(CustomizerProviderImpl.java:160)
Created attachment 79767 [details] stacktrace
Build: NetBeans IDE Dev (Build 200904011705) VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Windows XP, 5.1, x86 User Comments: I import an eclipse project and then when i want to open it occur this error. Stacktrace: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:579) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:576) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:576) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$3.run(GeneratedFilesHelper.java:804) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$3.run(GeneratedFilesHelper.java:802)
Created attachment 80557 [details] stacktrace
Build: NetBeans IDE 6.7 Beta (Build 200904242137) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05, Java(TM) SE Runtime Environment, 1.6.0_02-b05 OS: Linux, 2.6.18-92.1.6.el5.centos.plusxen, i386 User Comments: I edited the project properties (right click Project icon > Properties > Run) - changed the Arguments for my Main class - and clicked "Ok" Stacktrace: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:579) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:576) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:576) at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties.save(J2SEProjectProperties.java:402) at org.netbeans.modules.java.j2seproject.ui.customizer.CustomizerProviderImpl$StoreListener.actionPerformed(CustomizerProviderImpl.java:160)
Created attachment 81095 [details] stacktrace
Build: NetBeans IDE Dev (Build 200905051401) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Windows XP, 5.1, x86 User Comments: Loaded an old project.. it complained about a reference to junit and junit_4.. I went to the project properties and saw junit3.8.2 and junit4.5 libraries were there... I tried to remove the junit3.8.2 library and got this error Stacktrace: org.openide.util.RequestProcessor$Item: task failed: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.openide.util.RequestProcessor$Item.fillInStackTrace(RequestProcessor.java:853) at java.lang.Throwable.<init>(Throwable.java:181) at java.lang.Exception.<init>(Exception.java:29) at org.openide.util.RequestProcessor$Item.<init>(RequestProcessor.java:819) at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:629) at org.openide.util.RequestProcessor.post(RequestProcessor.java:295)
Created attachment 81662 [details] stacktrace
Build: NetBeans IDE Dev (Build 200905051401) VM: Java HotSpot(TM) Client VM, 14.0-b13, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b04 OS: Windows XP, 5.1, x86 User Comments: Trying to fix libs.CopyLibs.classpath property is not set up error after importing project from beta Stacktrace: org.openide.util.RequestProcessor$Item: task failed: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.openide.util.RequestProcessor$Item.fillInStackTrace(RequestProcessor.java:853) at java.lang.Throwable.<init>(Throwable.java:181) at java.lang.Exception.<init>(Exception.java:29) at org.openide.util.RequestProcessor$Item.<init>(RequestProcessor.java:819) at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:629) at org.openide.util.RequestProcessor.post(RequestProcessor.java:295)
Created attachment 81666 [details] stacktrace
When I open some old projects I now get reference errors related to JUnit. The project shows JUnit 3.8.2 and Junit 4.5 under “Test Libraries” but it shows in red with reference problems. Choosing “Resolve Reference Problems…” it shows me to libraries that can’t be found “junit” and “junit_4”. When I went to the project properties and tried to remove the JUnit 3.8.2 library that was there it threw an exception (reported as #199582) claimed as a duplicate of http://statistics.netbeans.org/analytics/detail.do?id=132871 I closed the offending project but when I tried to re-open it I get the same error. The I exited NB (200905051401) and when I opened the project it no-longer had reference problems.
Build: NetBeans IDE Dev (Build 200905051401) VM: Java HotSpot(TM) Client VM, 14.0-b13, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b04 OS: Windows XP, 5.1, x86 User Comments: Changing main class in a j2ee client application Stacktrace: org.openide.util.RequestProcessor$Item: task failed: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.openide.util.RequestProcessor$Item.fillInStackTrace(RequestProcessor.java:853) at java.lang.Throwable.<init>(Throwable.java:181) at java.lang.Exception.<init>(Exception.java:29) at org.openide.util.RequestProcessor$Item.<init>(RequestProcessor.java:819) at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:629) at org.openide.util.RequestProcessor.post(RequestProcessor.java:295)
Created attachment 81689 [details] stacktrace
Build: NetBeans IDE Dev (Build 200905121401) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05, Java(TM) SE Runtime Environment, 1.6.0_02-b05 OS: Linux, 2.6.18-92.1.6.el5.centos.plusxen, i386 User Comments: Stacktrace: org.openide.util.RequestProcessor$Item: task failed: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.openide.util.RequestProcessor$Item.fillInStackTrace(RequestProcessor.java:853) at java.lang.Throwable.<init>(Throwable.java:181) at java.lang.Exception.<init>(Exception.java:29) at org.openide.util.RequestProcessor$Item.<init>(RequestProcessor.java:819) at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:629) at org.openide.util.RequestProcessor.post(RequestProcessor.java:295)
Created attachment 82028 [details] stacktrace
Is anybody able to reliably reproduce this issue? Without reproducible test case it's very difficult to fix.
Attached is a sample project that trips this behavior for me every time. This project was generated by the Eclipse Project Importer, it throws an exception when the project is being generated. After the project is generated (there is a nbproject directory in the project), when I try to open the project in NetBeans this exception is thrown every time. I suspect that this issue has something to do w/ timestamps on the files, thus, there is a chance that you might not be able to reproduce it with the provided sample project. When I take this same project and copy it to a different directory (presumably, the timestamps will change on files), then I'm able to open the project with no issues. Yet, if you inspect the timestamps on the files in the zip, that might be helpful in identifying the issue.
Created attachment 82197 [details] project that trips the issue
As you correctly anticipated I'm not able to reproduce with attached project, I will check those timestamps, but I doubt it's related to them. It's more threading related problem.
Indeed, it does look very much like a threading issue. The reason I did mention time stamps is that this is the only difference between the project causing the issue and the one that doesn't (e.g. unzipping this project into a new directory stops the behavior). It seems like a particular timestamp on a file causes NB to try to regenerate the build-impl while something else is holding the lock. Anyway, from the other stack traces it's obvious that other issues trip this problem as well, so the root cause is not in the timestamps.
Build: NetBeans IDE Dev (Build 200905270201) VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Windows XP, 5.1, x86 User Comments: Opened a NB6.5 JavaSE project.. tried to run a file in it.. failed because the working directory was not valid. Changed the working directory via project properties. Tried again... NB failed to find build-impl.xml.. instead I saw a "build-impl.xml~" file it it's place, the original had been deleted (subversion showed this). I reverted the changes with subversion (external to the IDE).. Tried again... but the old, invalid working directory was back... tried to change it again via project properties and this happned Stacktrace: org.openide.util.RequestProcessor$Item: task failed due to: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.openide.util.RequestProcessor.post(RequestProcessor.java:267) at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener.actionPerformed(CustomizerDialog.java:270) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
Created attachment 82867 [details] stacktrace
Anybody able to reproduce the issue?
Created attachment 84322 [details] Sources of module to produce this exception artificially
It is easy to produce the exception using a module which intentionally modifies project.xml (without saving it) every few seconds - attached. Whether there is some module which is actually doing that, I have no idea. Anyway, I am adding some diagnostics in core-main #f5aca42c4766 so that if it occurs again in a dev build we will get a stack trace for the code which actually modified project.xml. If my suspicion is correct that this is just some random module modifying project.xml, then one fix is simply to make sure that module saves the project immediately. We could also just stop throwing ISE and let build-impl.xml be regenerated even though there are in-memory changes to project.xml which might be relevant to its contents. (The API specifies that ISE will be thrown, but I guess it is not much of an incompatibility to cease doing so.) It is likely that the changes are not in fact relevant to build-impl.xml, so this might be an acceptable workaround, but I would like to get some diagnostics first to make sure we understand what is happening and why.
Jesse, do you think it's worth to put this patch to 6.7.1. I'd say so.
Integrated into 'main-golden', will be available in build *200907031400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f5aca42c4766 User: Jesse Glick <jglick@netbeans.org> Log: Diagnostics for #155010: ISE when project.xml is modified in memory and build-impl.xml is to be regenerated.
Well it's not really a fix, just diagnostics. I would like to get some information about the problem before recommending anything be pushed into 6.7.x. Judging by the number of duplicates I would expect a dev build user to hit this sometime soon.
108 duplicates ... P2 (at least) ... candidate for NB 6.7 patch (not for Patch1)
Now just logging the ISE at INFO. Will still capture information about why project.xml was modified, but this will not be sent to the exception reporter. (It is a potential problem if modules are making modifications but never asking to save them, so this should be logged somehow.) Also attempting to save the modifications before regenerating build-impl.xml. Verified behavior against test module, though this may not be representative of the actual situations people have encountered. core-main #de915f74a7bf (builds on top of f5aca42c4766)
Integrated into 'main-golden', will be available in build *200907231401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/de915f74a7bf User: Jesse Glick <jglick@netbeans.org> Log: #155010: behave more robustly w.r.t. unsaved modifications of project.xml.
Build: NetBeans IDE 6.7.1 (Build 200907230233) VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08 OS: Linux, 2.6.28-15-generic, i386 User Comments: Stacktrace: java.lang.IllegalStateException: Cannot generate build scripts from a modified project at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:579) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper$2.run(GeneratedFilesHelper.java:576) at org.openide.util.Mutex.readAccess(Mutex.java:327) at org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState(GeneratedFilesHelper.java:576) at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties.save(J2SEProjectProperties.java:402) at org.netbeans.modules.java.j2seproject.ui.customizer.CustomizerProviderImpl$StoreListener.actionPerformed(CustomizerProviderImpl.java:160)
Created attachment 86280 [details] stacktrace
v/c
*** Bug 154723 has been marked as a duplicate of this bug. ***
*** Bug 213488 has been marked as a duplicate of this bug. ***