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.
Summary: | Netbeans fails to build java projects 2 out of 3 times with simple project dependencies | ||
---|---|---|---|
Product: | java | Reporter: | netbeansuzr |
Component: | Project | Assignee: | Tomas Zezula <tzezula> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | CC: | anebuzelsky, jiriprox |
Priority: | P1 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
netbeansuzr
2014-10-15 11:12:14 UTC
Please attach the messages.log and the output of build action Thanks There is the following error in the logs when it can't delete the .gif file: INFO [org.openide.filesystems.JarFileSystem]: error in opening zip file java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:220) at java.util.zip.ZipFile.<init>(ZipFile.java:150) at java.util.jar.JarFile.<init>(JarFile.java:166) at java.util.jar.JarFile.<init>(JarFile.java:145) [catch] at org.openide.filesystems.JarFileSystem.getJar(JarFileSystem.java:965) at org.openide.filesystems.JarFileSystem.reOpenJarFile(JarFileSystem.java:736) at org.openide.filesystems.JarFileSystem.parse(JarFileSystem.java:839) at org.openide.filesystems.JarFileSystem.access$100(JarFileSystem.java:93) at org.openide.filesystems.JarFileSystem$1.fileChanged(JarFileSystem.java:357) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:461) at com.sun.proxy.$Proxy1.fileChanged(Unknown Source) at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEventImpl(FCLSupport.java:178) at org.openide.filesystems.FCLSupport$DispatchEventWrapperSingle.dispatchAllEventsSync(FCLSupport.java:224) at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEvent(FCLSupport.java:137) at org.openide.filesystems.FCLSupport.dispatchEvent(FCLSupport.java:105) at org.openide.filesystems.FileObject$ED.dispatch(FileObject.java:1318) at org.openide.filesystems.FileSystem$EventDispatcher.run(FileSystem.java:999) at org.openide.filesystems.EventControl.dispatchEvent(EventControl.java:84) at org.openide.filesystems.FileSystem.dispatchEvent(FileSystem.java:644) at org.openide.filesystems.FileObject.dispatchEvent(FileObject.java:635) at org.openide.filesystems.FileObject.fireFileChangedEvent(FileObject.java:603) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.fireFileChangedEvent(BaseFileObj.java:697) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.refreshImpl(FileObj.java:364) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.refresh(BaseFileObj.java:843) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.refresh(FileObj.java:375) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.refreshImpl(FolderObj.java:484) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.refresh(BaseFileObj.java:843) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.refresh(FolderObj.java:562) at org.openide.filesystems.FileObject.refresh(FileObject.java:1206) at org.netbeans.modules.masterfs.watcher.Watcher$1.run(Watcher.java:422) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) then it points to the jar file that contains the gif It looks like I can reproduce the unable to delete error if I hit play on the project right after netbeans starts up (while it's still background scanning). If I do this, even after the background scan finishes, it still can't delete the file and I have to restart the IDE. Can you please check your background scanning code and make sure it doesn't interfere with the build process? I noticed that while I'm building a project, the background scan will sometimes kicks in. Why is it background scanning compiled code that is completely managed by the IDE? Thanks The scan process do not touch either the "build" or the "dist" folder. It uses just the project's source folders. The editor was opening the dist/**.jar files while loading annotation processors. However it was fixed in NB 8.0.1 the processor loading is exclusive to the clean action. To QA: The problem needs to be reproduced on Windows. UNIX has much more robust file system implementation and is not susceptible to these problems. In reply to comment #2: >There is the following error in the logs when it can't delete the .gif file Which gif? The only part of the build which deletes something is a clean and it deletes the jar files as whole it does not delete individual files from the archive. Can you describe it in more details? Thanks This is still not fixed in: Product Version: NetBeans IDE 8.0.2 (Build 201411181905) The unit test window with the progress is also broken. It randomly doesn't display the tests below the progress bar when running the same test class (even without changing the test class). This issue is still unresolved. Is there any update on it? Just having a .gif file in project A, and then doing a clean and build on project B (which under libraries depends on project A), results in this failure. More detailed explanation/environment: Project A -has a .gif in the classpath. This gif is referenced from a BeanInfoObject which is for a custom GUI component (similar to a check box in this example). This custom GUI component along with the Bean Info and the .gif are all in project A Project B -depends on project A through libraries Project C -depends on project A through libraries -depends on project B through libraries Scenario to reproduce -start the NetBeans IDE (with all the above projects already open from the previous run), then right click on Project C and click on clean and build. Often times the build will fail complaining that it can't delete the .gif file. Doing clean and build again still causes the same failure message and the only way to fix this is to restart the IDE and hope that it doesn't happen again. If instead of cleaning and building project C, I manually build project A first, then project B, then project C, the failure either doesn't happen at all or is less likely to happen. The problem is that after developing for a while, I can run into the same issue. I should not have to build projects A and B manually, that's why I use an IDE to automate tasks like this. Note that all projects, A, B and C have "Build Projects on Classpath" under libraries checked. Since you were unable to reproduce the issue, I'm thinking it might be related to the Graphical GUI editor in NetBeans or possibly also to the above project dependency setup. Can you please try to reproduce this issue and fix it. It is extremely annoying and time consuming to deal with every day. I've tried to setup the project according to your description but I didn't get the error. I even tried to use the UI beans from project A in the form in project C. Sometimes when I run clean & build too fast in a row the error orrures saying Cannot delete A.jar (which is product of project A). But after a shor while (about 4s on my computer) all is fine againg and next clean&build is correct. Can you please provide more info? 1) What proecess is holding the gif? (you can find it by proces explorer) 2) Can you set ant verbosity level to debug (in Options -> Java -> Ant) and post the clean & build output? 3) can you share the projects? Or at least the importatnt part (you can send it by mail directly to me, if you don't want to share it here) Thanks Reporter, please provide the information requested above. Then reopen. Thanks. |