Bug 201805 - Error if --cachedir does not exist and cannot be created
Error if --cachedir does not exist and cannot be created
Status: NEW
Product: platform
Classification: Unclassified
Component: Launchers&CLI
7.1
PC Windows 7
: P4 (vote)
: TBD
Assigned To: Libor Fischmeistr
issues@platform
:
Depends on:
Blocks: 57798
  Show dependency treegraph
 
Reported: 2011-09-08 11:07 UTC by xgathos
Modified: 2014-02-10 14:16 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
var/log/messages when cachedir not exists (8.13 KB, text/plain)
2011-09-13 11:25 UTC, xgathos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xgathos 2011-09-08 11:07:06 UTC
[ BUILD # : 201109070600 ]
[ JDK VERSION : 1.7 ]

If given cachedir does not exist, netbeans stops loading - without an info.

it would be better to inform the user about the problem
Comment 1 Jesse Glick 2011-09-08 21:35:43 UTC
(In reply to comment #0)
> If given cachedir does not exist, netbeans stops loading - without an info.

Seems to work fine for me on Linux. Are there are particular steps to reproduce? Can you attach $userdir/var/log/messages.log if it gets that far? Perhaps the failure is in the Windows launcher before the Java process is even started?
Comment 2 ulfzibis 2011-09-09 00:43:47 UTC
(In reply to comment #0)
> [ BUILD # : 201109070600 ]
> [ JDK VERSION : 1.7 ]
> 
> If given cachedir does not exist, netbeans stops loading - without an info.

Do you mean, it physically doesn't exist, e.g. not connected/mounted USB-drive?
Comment 3 Antonin Nebuzelsky 2011-09-12 13:42:13 UTC
I was only able to reproduce a problem with --cachedir if the path I provided was an unreachable path on my machine. E.g. "--cachedir i:\tmp\cache" where the disk i: does not exist on my windows box.

If the path did not exist but the folder could be created, NetBeans started normally, created the folder and started storing the cache data there.

In the case of unreachable path the following log messages were written to messages.log:

   WARNING [org.openide.modules.Places]: could not create I:\tmp\cache

We could probably raise a dialog box and tell the user that NetBeans cannot reach the path.

Decreasing to P3 and reassigning. The code in org.openide.modules.Places should show the warning.
Comment 4 xgathos 2011-09-13 11:25:02 UTC
Created attachment 110703 [details]
var/log/messages when cachedir not exists
Comment 5 xgathos 2011-09-13 11:26:00 UTC
sorry for late reply. 

yes i can confirm: if just the path did not exists, netbeans created it. but if the drive did not exists, netbeans just dies. I discovered this because the ramdisc for the the cache did not work :)

in the messages log (attached) the error is written correctly. would be better to inform the user :)
Comment 6 Jesse Glick 2011-10-14 16:46:56 UTC
org.openide.modules.Places cannot and should not show a warning dialog. It is possible there is some place in core where this could be done, but it seems a low priority; the Windows launcher itself will in a future release set --cachedir and might do some checks before starting the Java process.
Comment 7 Jiri Rechtacek 2012-02-16 16:57:25 UTC
Assigned to new owner.


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