Frank,
Which JRE are you using?
I just got bit by tiger myself. I did my development with NB 6.1 and JRE
1.6 on Vista and Linux Etch. Tiger only supports 1.5. I had to upgrade to
leopard (Mac OS 10.5) to get the 1.6 JRE and then all was well. I do not
know if your error is a 1.5 vs 1.6 problem but beware of the limitations
with tiger.
Joe
-----Original Message-----
From: news [mailto:
news@...] On Behalf Of Frank-Michael Moser
Sent: Monday, May 05, 2008 12:43 PM
To:
dev@...
Subject: [openide-dev] NPE in FileInfo.exists
I'm desperate: almost the whole day I tried to find the reason for a NPE at
org.netbeans.modules.masterfs.filebasedfs.utils.FileInfo.exists(FileInfo.jav
a:119). The full logfile
is attached.
I have a RCP application based on NB 6.1. I deployed it as ZIP to Mac OS X
and Windows (on Mac
starting with the shell script launcher). Appearently the error from above
only occurs on Mac OS X
(here Tiger). On Windows the same build seems to run fine.
I have investigated the problem a bit deeper and found this code at line 119
line in FileInfo:
> (FileChangedManager.getInstance().exists(getFile())) ? 1 : 0;
In FileChangedManager I found:
> public static FileChangedManager getInstance() {
> if (INSTANCE == null) {
> Lookup.getDefault().lookup(SecurityManager.class);
> assert INSTANCE != null;
> }
> return INSTANCE;
> }
So obviously getInstance() returns null which triggers the NPE. Now in
masterfs'
META-INF/services/java.lang.SecurityManager I found
> org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager
and finally in FileChangedManager
> public FileChangedManager() {
> INSTANCE = this;
> }
which is the only place where the INSTANCE variable is written. Obviously
the masterfs module was
already loaded (at least I think so because its classes are active).
So what's wrong here. Any pointers to a promising debugging strategy are
highly appreciated.
Thanks,
Frank-Michael