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.java: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
INFO 2008-05-05 17:58:19 [org.netbeans.core.startup.TopLogging]:
-------------------------------------------------------------------------------
>Log Session: Monday, May 5, 2008 5:58:19 PM CEST
>System Info:
Product Version = Delta2D 200804211638
Operating System = Mac OS X version 10.4.11 running on ppc
Java; VM; Vendor = 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-121; Apple Computer, Inc.
Runtime = Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_13-b05-241
Java Home = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
System Locale; Encoding = de_DE (delta2d); MacRoman
Home Directory = /Users/moser
Current Directory = /Applications/DECODON/Delta2D/4.0
User Directory = /Users/moser/.Delta2D
Installation = /Applications/DECODON/Delta2D/4.0/delta2d
/Applications/DECODON/Delta2D/4.0/decodon
/Applications/DECODON/Delta2D/4.0/platform8
Boot & Ext. Classpath = /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/charsets.jar:/System/Library/Java/Extensions/CoreAudio.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dsupport.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunpkcs11.jar
Application Classpath = /Applications/DECODON/Delta2D/4.0/platform8/lib/boot.jar:/Applications/DECODON/Delta2D/4.0/platform8/lib/org-openide-modules.jar:/Applications/DECODON/Delta2D/4.0/platform8/lib/org-openide-util.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/lib/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar
Startup Classpath = /Applications/DECODON/Delta2D/4.0/platform8/core/core.jar:/Applications/DECODON/Delta2D/4.0/platform8/core/org-openide-filesystems.jar:/Applications/DECODON/Delta2D/4.0/Delta2D.app/Contents/MacOS/../../../bin/../delta2d/core/locale/core_delta2d.jar
-------------------------------------------------------------------------------
INFO 2008-05-05 17:58:23 [org.netbeans.core.startup.NbEvents]: Turning on modules:
INFO 2008-05-05 17:58:23 [org.netbeans.core.startup.NbEvents]:
org.openide.util [7.12.0.1 1 200804211638]
org.openide.modules [7.6 200804211638]
org.openide.awt [7.1.0.1 200804211638]
org.netbeans.api.progress/1 [1.11.0.1 1 200804211638]
org.jdesktop.layout/1 [1.5 1.0.3 200804211638]
org.openide.dialogs [7.6 200804211638]
org.openide.nodes [7.3.0.1 200804211638]
com.decodon.modules.context [1.0 080430]
org.openide.filesystems [7.8 200804211638]
org.netbeans.modules.queries/1 [1.12 200804211638]
org.netbeans.modules.masterfs/2 [2.14 200804211638]
com.decodon.modules.scripting [1.0 080430]
javax.media.jai [1.0 080430]
com.install4j.runtime [1.0 080430]
javax.media.j3d [1.0 080430]
com.decodon.libs.misc [1.0 080430]
com.decodon.modules.windows [1.0 080430]
com.decodon.apps.delta2d [1.0 080430]
com.decodon.modules.delta2d.nodes [1.0 080505]
org.openide.windows [6.20 200804211638]
org.netbeans.modules.editor.mimelookup/1 [1.9 200804211638]
org.openide.text [6.18 200804211638]
org.openide.explorer [6.13 1 200804211638]
org.openide.actions [6.7.0.1 200804211638]
org.openide.loaders [6.9 200804211638]
org.netbeans.libs.jsr223/1 [1.7 6 200804211638]
org.netbeans.modules.templates [1.2 200804211638]
com.decodon.libs.beanshell [1.0 080430]
org.netbeans.modules.editor.mimelookup.impl/1 [1.2 200804211638]
com.decodon.modules.delta2d.contextbridge [1.0 080505]
org.netbeans.bootstrap/1 [2.11 200804211638]
org.netbeans.modules.options.api/1 [1.6 200804211638]
org.netbeans.core.startup/1 [1.12.0.1 200804211638]
org.netbeans.swing.plaf [1.7 200804211638]
org.openide.io [1.12 200804211638]
org.netbeans.core/2 [3.7.0.1 200804211638]
org.netbeans.modules.settings/1 [1.14 200804211638]
org.netbeans.modules.autoupdate.services [1.4 200804211638]
org.netbeans.modules.autoupdate.ui [1.4 200804211638]
org.netbeans.modules.favorites/1 [1.13 200804211638]
org.netbeans.modules.progress.ui [1.1 200804211638]
com.decodon.modules.delta2d [1.0 080505]
org.netbeans.core.ui/1 [1.11 200804211638]
org.netbeans.swing.tabcontrol [1.11 200804211638]
org.netbeans.core.windows/2 [2.10.0.1 200804211638]
org.netbeans.modules.options.keymap [1.3 200804211638]
org.netbeans.modules.core.kit [1.1 200804211638]
org.netbeans.libs.jna/1 [1.0 200804211638]
org.jdesktop.swingx [1.0 080430]
org.netbeans.modules.applemenu/1 [1.8 200804211638]
org.netbeans.api.visual [2.10 200804211638]
com.decodon.libs.jruby [1.0 080430]
com.decodon.modules.io [1.0 080430]
com.decodon.modules.workflow [1.0 080505]
com.decodon.modules.lighttable [1.0 080505]
org.netbeans.core.nativeaccess/1 [1.0 200804211638]
org.netbeans.core.output2/1 [1.9.0.1 1 200804211638]
INFO 2008-05-05 17:58:25 [com.decodon.util.logging.LoggingConfig]: Product: DECODON Delta2D 4.0 Beta 09 (20080424)
INFO 2008-05-05 17:58:26 [global]: Loaded application properties /Applications/DECODON/Delta2D/4.0/Delta2D.ini
INFO 2008-05-05 17:58:26 [global]: Loaded application properties /Users/moser/.Delta2D/Delta2D.ini
INFO 2008-05-05 17:58:26 [global]:
Could not set L&F Mac OS X Aqua
Thread AWT-EventQueue-1: Mac OS X Aqua: Will not load classes from default package (Mac OS X Aqua)
javax.swing.UnsupportedLookAndFeelException: Mac OS X Aqua: Will not load classes from default package (Mac OS X Aqua)
at com.decodon.swing.plaf.LookAndFeelFactory.createLookAndFeel(LookAndFeelFactory.java:352)
at com.decodon.swing.plaf.LookAndFeelFactory.setCurrentLookAndFeel(LookAndFeelFactory.java:239)
[catch] at com.decodon.swing.plaf.LookAndFeelFactory.initDefaultLookAndFeel(LookAndFeelFactory.java:192)
at com.decodon.awt.UIProperties.initDefaultUI(UIProperties.java:179)
at com.decodon.awt.UIProperties.initDefaultUI(UIProperties.java:169)
at com.decodon.apps.delta2d.Delta2DProperties.<clinit>(Delta2DProperties.java:177)
at com.decodon.Delta2D.<init>(Delta2D.java:69)
at com.decodon.Delta2D.main(Delta2D.java:122)
at com.decodon.modules.delta2d.startup.Installer$1.run(Installer.java:29)
at org.netbeans.core.windows.WindowManagerImpl$Exclusive.run(WindowManagerImpl.java:1298)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
INFO 2008-05-05 17:58:27 [org.netbeans.core.ui.warmup.DiagnosticTask]:
Diagnostic information
Input arguments:
-Djdk.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
-Dnetbeans.system_http_proxy=DIRECT
-Dnetbeans.system_http_non_proxy_hosts=
-Dnetbeans.dirs=/Applications/DECODON/Delta2D/4.0/Delta2D.app/Contents/MacOS/../../../bin/../delta2d:/Applications/DECODON/Delta2D/4.0/Delta2D.app/Contents/MacOS/../../../bin/../decodon:
-Dnetbeans.home=/Applications/DECODON/Delta2D/4.0/platform8
-Dcom.apple.mrj.application.apple.menu.about.name=Delta2D
-Xms24m
-Xmx513M
Compiler: HotSpot Client Compiler
Heap memory usage: initial 24.0MB maximum 508.3MB
Non heap memory usage: initial 28.2MB maximum 116.0MB
Garbage collector: Copy (Collections=27 Total time spent=0s)
Garbage collector: MarkSweepCompact (Collections=0 Total time spent=0s)
Classes: loaded=4058 total loaded=4058 unloaded 0
INFO 2008-05-05 17:58:27 [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 1,342,177,280
INFO 2008-05-05 17:58:27 [null]: Total physical memory 1,342,177,280
WARNING 2008-05-05 17:58:27 [org.openide.filesystems.Ordering] Ordering getOrder:
Not all children in Menu/Edit/ marked with the position attribute: [Separator3.instance], but some are: [org-openide-actions-UndoAction.instance, org-openide-actions-RedoAction.instance, Separator1.instance, Separator2.instance]
WARNING 2008-05-05 17:58:28 [org.openide.filesystems.Ordering] Ordering getOrder:
Not all children in Menu/Window/ marked with the position attribute: [ExplorerAction.shadow], but some are: [ProjectManagerAction.shadow, DualViewAction.shadow, QuantitationTableAction.shadow, ColorCodingAction.shadow, ExpressionProfilesAction.shadow, GelImageRegionsAction.shadow, JobManagerAction.shadow, WorkflowAction.shadow, LightTableAction.shadow, WarpingSetupAction.shadow, Separator1.instance, SwitchToRecentDocumentAction.shadow, ProgressListAction.shadow, Separator3.instance, CloseWindowAction.shadow, MaximizeWindowAction.shadow, org-netbeans-core-windows-actions-UndockAction.shadow, Separator4.instance, CloneDocumentAction.shadow, CloseAllDocumentsAction.shadow, CloseAllButThisAction.shadow, DocumentsAction.shadow, Separator5.instance, org-netbeans-core-windows-actions-ResetWindowsAction.instance]
SEVERE 2008-05-05 17:58:59 [org.openide.util.RequestProcessor] RequestProcessor$Processor doNotify
java.lang.NullPointerException
at org.netbeans.modules.masterfs.filebasedfs.utils.FileInfo.exists(FileInfo.java:119)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileInfo.isConvertibleToFileObject(FileInfo.java:175)
at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.getInstance(FileObjectFactory.java:111)
at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.getInstance(FileObjectFactory.java:99)
at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.<init>(FileBasedFileSystem.java:82)
at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.<clinit>(FileBasedFileSystem.java:72)
Caused: java.lang.ExceptionInInitializerError
at org.netbeans.modules.masterfs.filebasedfs.FileBasedURLMapper.getFileObjects(FileBasedURLMapper.java:129)
at org.netbeans.modules.masterfs.MasterURLMapper.getFileObjects(MasterURLMapper.java:61)
at org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:213)
at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:669)
at org.openide.filesystems.FileUtil.getDiskFileSystemFor(FileUtil.java:131)
at org.openide.filesystems.FileUtil.refreshFor(FileUtil.java:151)
at org.openide.filesystems.FileUtil.refreshAll(FileUtil.java:167)
at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter.run(MenuWarmUpTask.java:143)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
SEVERE 2008-05-05 18:00:15 [org.openide.util.RequestProcessor] RequestProcessor$Processor doNotify
java.lang.NoClassDefFoundError
at org.netbeans.modules.masterfs.filebasedfs.FileBasedURLMapper.getFileObjects(FileBasedURLMapper.java:129)
at org.netbeans.modules.masterfs.MasterURLMapper.getFileObjects(MasterURLMapper.java:61)
at org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:213)
at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:669)
at org.openide.filesystems.FileUtil.getDiskFileSystemFor(FileUtil.java:131)
at org.openide.filesystems.FileUtil.refreshFor(FileUtil.java:151)
at org.openide.filesystems.FileUtil.refreshAll(FileUtil.java:167)
at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter.run(MenuWarmUpTask.java:143)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
SEVERE 2008-05-05 18:01:06 [org.openide.util.RequestProcessor] RequestProcessor$Processor doNotify
java.lang.NoClassDefFoundError
at org.netbeans.modules.masterfs.filebasedfs.FileBasedURLMapper.getFileObjects(FileBasedURLMapper.java:129)
at org.netbeans.modules.masterfs.MasterURLMapper.getFileObjects(MasterURLMapper.java:61)
at org.openide.filesystems.URLMapper.findFileObject(URLMapper.java:213)
at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:669)
at org.openide.filesystems.FileUtil.getDiskFileSystemFor(FileUtil.java:131)
at org.openide.filesystems.FileUtil.refreshFor(FileUtil.java:151)
at org.openide.filesystems.FileUtil.refreshAll(FileUtil.java:167)
at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter.run(MenuWarmUpTask.java:143)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)