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.
Adding a new jarfile to project libraries hangs (sometimes only temporarily) the NetBeans GUI. Steps to reproduce: - Invoke "Properties" on project node. - Add a jarfile for compilation. - Click "OK" to finish adding jarfile to libraries. At this point, the NetBeans GUI hangs with a grey space where the properties dialog had been. Sometimes the GUI will eventually come back. Sometimes not. I don't know whether it's relevant or not, but my project is located on a microsoft network directory.
Can you provide more information about the version of jdk and NetBeans, please? If hang happens , can you attach the message.log? Thanks.
I also am having problems with a project located on a network drive, in this case a NetWare volume mapped to a drive letter. These issues (detailed below) did not occur with NetBeans 4.0. Software information: NetBeans 4.1 RC 1 with J2SDK 1.4.2_04 on Windows 2000 Professional SP4 Below is the series of attempts I made to open form files with 4.1RC1. After I post this comment, I will attach the thread dumps I took and the messages.log files from these attempts. First case: Started NB 4.1RC1 and allowed it to import settings from NB 4.0. At startup, I received a message window with the title "Warning" and message "L:\PCT\DEVELOP\RCM\project\nbproject\private\.LCKprivate.properties~". With the exception of this message, it appeared to work fine, including opening the last project I'd had open in 4.0. I was able to open source files with no problems, including right-clicking on a form and selecting "Edit". However, when I attempted to switch to the "Design" view, NetBeans displayed the form (and it looked correct), the "Pallete" (also looking correct), and empty "Properties" and "Inspector" tabs, then drove CPU usage to 100% and stopped responding (apparently forever - I allowed it to sit unattended for several minutes). After killing NetBeans and restarting it, I attempted to open the same form by double-clicking on it and achieved the same results. After once again killing NetBeans and restarting it, I attempted to open a different form (with a different parent class) and achieved the same results. The first form I attempted to open was a JInternalFrame (actually a subclass of JInternalFrame that I created and that was present in the source directory with the form I was attempting to open). The second was a JDialog. In looking at messages.log, I was able to find exceptions when opening the JInternalFrame but now when opening the JDialog, but opening either file resulted in the same lock-up. Second case: Removed the NB4.1RC1 user directory and did not import settings from 4.0 when starting for the first time. No warnings or errors on startup. Attempted to open the project from the first case (with all project-related files on the network drive). It, of course, complained about unresolved dependencies. I right-clicked on the project node in the "Projects" tab and selected the menu option to resolve the problems ("Resolve dependencies" or something similar). It prompted me to upgrade the project. I agreed and it displayed a message box with "Warning" as the title and "L:\PCT\DEVELOP\RCM\project\nbproject\.LCKproject.xml~" as the entire message. The project was apparently *not* upgraded, because each time I tried to resolve the dependency issues I would receive the upgrade message. Third case: Moved the project directory structure and files (not the source files) to my local drive and started NetBeans. I was able to open and upgrade the project, and resolve the dependencies, but when attempting to open forms, I had the same problem as in the first case (100% CPU usage and nonresponsive NetBeans). Fourth case: Moved the source and test files to my local drive, modified private.properties to point to the new source and test directories, and started NetBeans. Everything appears to work properly.
Created attachment 21830 [details] Thread Dump from "First Case" attempt to open JInternalFrame form
Created attachment 21831 [details] Thread Dump from "First Case" attempt to open JDialog form
Created attachment 21832 [details] NB log from "First Case" runs
Created attachment 21833 [details] NB log from "Second Case" and "Third Case" runs
Reassigned from ide issues to java/j2seprojects.
This does not seem to be a project problem. Radku, can you evaluate the LCK problem?
We use java.ni file-locking mechanism. Please, could you evaluate that you are able to use java.nio.channels.FileLock on your remote L: drive. Write up some simple program, something like (standalone tiny one class application): File f = new File ("L:\PCT\DEVELOP\RCM\project\nbproject\private\private.properties"); final RandomAccessFile raf = new RandomAccessFile(f, "rwd");//NOI18N channel = raf.getChannel(); assert channel.isOpen(); nioLock = channel.tryLock();
It would appear that I cannot. I took the code you provided and expanded it to include feedback and to test both a local drive and network (mapped) drive attempt. Below is the code (which was in a main() method of an otherwise empty class) and the output. ---------------------------- The code: File f = new File("L:\\PCT\\DEVELOP\\RCM\\project\\nbproject\\private\\private.properties"); try { final RandomAccessFile raf = new RandomAccessFile(f, "rwd");//NOI18N FileChannel channel = raf.getChannel(); assert channel.isOpen(); FileLock nioLock = channel.tryLock(); if(null == nioLock) { System.out.println("Attempt to lock on network drive failed with no exception."); } else { System.out.println("Attempt to lock on network drive succeeded. nioLock.toString() contents: " + nioLock.toString()); } } catch(FileNotFoundException e) { e.printStackTrace(); } catch(IOException e2) { e2.printStackTrace(); } File f2 = new File("C:\\backups\\RCM\\project\\nbproject\\private\\private.properties"); try { final RandomAccessFile raf = new RandomAccessFile(f2, "rwd");//NOI18N FileChannel channel = raf.getChannel(); assert channel.isOpen(); FileLock nioLock = channel.tryLock(); if(null == nioLock) { System.out.println("Attempt to lock on local drive failed with no exception."); } else { System.out.println("Attempt to lock on local drive succeeded. nioLock.toString() contents: " + nioLock.toString()); } } catch(FileNotFoundException e) { e.printStackTrace(); } catch(IOException e2) { e2.printStackTrace(); } ---------------------------- The output: run: Attempt to lock on network drive failed with no exception. Attempt to lock on local drive succeeded. nioLock.toString() contents: sun.nio.ch.FileLockImpl[0:9223372036854775807 exclusive valid] BUILD SUCCESSFUL (total time: 0 seconds)
Do you have appropriate rights on that network path ?
Yes, I have the necessary rights to that directory. And I reiterate that I had no problems of this sort with NB4.0. I'm also sorry to see that the priority on this defect has been set to a lower level since failure to fix the problem means that 4.1 is effectively made unavailable to me and the 3 or 4 people I work with who are currently working with Java in NB4.0.
So, from results of the test is obvious that the problem isn't in Netbeans. Then there might be some specific JDK bug or some problem somwere in your network. You can first try JDK 1.5 just in the case there was JDK bug. You can also try the same simple program (for testing file locking) in C or C++ , compile and see results - then you will know whether this problem is java centric. If also this program writen in C, C++ will fail then you must ask your admin why it doesn't work. You can easily increase priority of this bug again. But I think that the problem isn't in NB code.
I have performed the same test using JDK 1.5.0_02 with the same results. I even added a third test with a file on a mapped Windows Network drive. The lock succeeded on that drive but consistently fails on the NetWare drive. The particularly odd thing is that I achieve the same results (lock failed, no exception) even if I specify a file name that does not exist. In any event, it would appear that you're correct and that my problem isn't in NB itself. Too bad the problem still kills our ability to move forward with NB. It also may not explain the original reporter's problem since my tests consistently succeed in achieving a lock on a MS network drive and his problem was apparently with files on a MS network drive.
Similar issue (reported on Mac) #57534.
*** This issue has been marked as a duplicate of 57534 ***
This issue had *1 votes* before move to platform component