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.

Bug 243219 - NullPointerException when running a JNLP application in Netbeans
Summary: NullPointerException when running a JNLP application in Netbeans
Status: RESOLVED INVALID
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 16:53 UTC by gouessej
Modified: 2014-07-17 14:07 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gouessej 2014-03-24 16:53:42 UTC
When creating an empty module suite and running it as a JNLP application (right-click -> JNLP -> Run), I get the following exception:
java.lang.NullPointerException
	at java.lang.String.startsWith(String.java:1385)
	at java.lang.String.startsWith(String.java:1414)
	at org.netbeans.modules.uihandler.EarlyHandler.publish(EarlyHandler.java:70)
	at org.netbeans.core.startup.TopLogging$LookupDel.publish(TopLogging.java:453)
	at java.util.logging.Logger.log(Logger.java:610)
	at java.util.logging.Logger.doLog(Logger.java:631)
	at java.util.logging.Logger.log(Logger.java:654)
[catch] at org.netbeans.modules.settings.RecognizeInstanceObjects$OverObjects.<init>(RecognizeInstanceObjects.java:124)
	at org.netbeans.modules.settings.RecognizeInstanceObjects.create(RecognizeInstanceObjects.java:95)
	at org.openide.util.lookup.implspi.NamedServicesProvider.forPath(NamedServicesProvider.java:90)
	at org.openide.util.lookup.Lookups.forPath(Lookups.java:225)
	at org.netbeans.modules.openide.util.ProxyURLStreamHandlerFactory.createURLStreamHandler(ProxyURLStreamHandlerFactory.java:76)
	at org.netbeans.ProxyURLStreamHandlerFactory.createURLStreamHandler(ProxyURLStreamHandlerFactory.java:159)
	at java.net.URL.getURLStreamHandler(URL.java:1150)
	at java.net.URL.<init>(URL.java:590)
	at java.net.URL.<init>(URL.java:482)
	at org.openide.filesystems.XMLFileSystem$FileObjRef.createAbsoluteUrl(XMLFileSystem.java:1051)
	at org.openide.filesystems.XMLFileSystem$FileObjRef.lastModified(XMLFileSystem.java:1100)
	at org.openide.filesystems.XMLFileSystem.lastModified(XMLFileSystem.java:454)
	at org.openide.filesystems.XMLFileSystem.access$200(XMLFileSystem.java:176)
	at org.openide.filesystems.XMLFileSystem$Impl.lastModified(XMLFileSystem.java:762)
	at org.openide.filesystems.AbstractFileObject.initLastModified(AbstractFileObject.java:98)
	at org.openide.filesystems.AbstractFileObject.lastModified(AbstractFileObject.java:178)
	at org.openide.filesystems.XMLFileSystem.refreshChildren(XMLFileSystem.java:565)
	at org.openide.filesystems.XMLFileSystem.refreshChildren(XMLFileSystem.java:568)
	at org.openide.filesystems.XMLFileSystem.refreshChildren(XMLFileSystem.java:568)
	at org.openide.filesystems.XMLFileSystem.refreshChildren(XMLFileSystem.java:568)
	at org.openide.filesystems.XMLFileSystem.refreshChildrenInAtomicAction(XMLFileSystem.java:528)
	at org.openide.filesystems.XMLFileSystem.setXmlUrls(XMLFileSystem.java:368)
	at org.openide.filesystems.XMLFileSystem.setXmlUrls(XMLFileSystem.java:309)
	at org.netbeans.core.startup.layers.ModuleLayeredFileSystem.appendLayers(ModuleLayeredFileSystem.java:161)
	at org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(ModuleLayeredFileSystem.java:116)
	at org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(ModuleLayeredFileSystem.java:112)
	at org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(ModuleLayeredFileSystem.java:108)
	at org.netbeans.core.startup.layers.SystemFileSystem.create(SystemFileSystem.java:253)
	at org.netbeans.core.startup.layers.SessionManager.create(SessionManager.java:99)
	at org.netbeans.core.startup.NbRepository.createDefaultFileSystem(NbRepository.java:155)
	at org.netbeans.core.startup.NbRepository.<init>(NbRepository.java:79)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at java.lang.Class.newInstance(Class.java:374)
	at org.openide.util.lookup.implspi.SharedClassObjectBridge.newInstance(SharedClassObjectBridge.java:64)
	at org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfServicesLookup.java:509)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:422)
	at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:222)
	at org.openide.filesystems.Repository.getDefault(Repository.java:362)
	at org.openide.filesystems.FileUtil.getConfigFile(FileUtil.java:2112)
	at org.openide.filesystems.FileUtil.getConfigRoot(FileUtil.java:2142)
	at org.netbeans.core.startup.preferences.PropertiesStorage.<clinit>(PropertiesStorage.java:77)
	at org.netbeans.core.startup.preferences.NbPreferences$UserPreferences.getFileStorage(NbPreferences.java:382)
	at org.netbeans.core.startup.preferences.NbPreferences.<init>(NbPreferences.java:115)
	at org.netbeans.core.startup.preferences.NbPreferences.<init>(NbPreferences.java:67)
	at org.netbeans.core.startup.preferences.NbPreferences$UserPreferences.<init>(NbPreferences.java:367)
	at org.netbeans.core.startup.preferences.NbPreferences.userRootImpl(NbPreferences.java:99)
	at org.netbeans.core.startup.preferences.PreferencesProviderImpl.preferencesRoot(PreferencesProviderImpl.java:74)
	at org.netbeans.core.startup.preferences.PreferencesProviderImpl.preferencesForModule(PreferencesProviderImpl.java:70)
	at org.openide.util.NbPreferences.forModule(NbPreferences.java:76)
	at org.netbeans.modules.uihandler.Installer.<clinit>(Installer.java:135)
	at org.netbeans.modules.uihandler.EarlyHandler.publish(EarlyHandler.java:70)
	at org.netbeans.core.startup.TopLogging$LookupDel.publish(TopLogging.java:453)
	at java.util.logging.Logger.log(Logger.java:610)
	at java.util.logging.Logger.doLog(Logger.java:631)
	at java.util.logging.Logger.log(Logger.java:654)
	at org.netbeans.core.startup.TopLogging.initialize(TopLogging.java:215)
	at org.netbeans.core.startup.TopLogging.initialize(TopLogging.java:173)
	at org.netbeans.core.startup.CLIOptions.initialize(CLIOptions.java:252)
	at org.netbeans.core.startup.Main.start(Main.java:241)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
	at java.lang.Thread.run(Thread.java:744)

Installer.UI_LOGGER_NAME is null but I don't know why as it is defined in the file Bundle.properties in the JAR org-netbeans-modules-uihandler.jar

This variable is used here:
http://hg.netbeans.org/main/file/b70c639dc467/uihandler/src/org/netbeans/modules/uihandler/EarlyHandler.java#l70

It is set here:
http://hg.netbeans.org/main/file/b70c639dc467/uihandler/src/org/netbeans/modules/uihandler/Installer.java#l177

I get this in the Java console:
mars 24, 2014 5:38:41 PM org.openide.util.RequestProcessor$TopLevelThreadGroup getTopLevelThreadGroup
Avertissement: AppContext group java.lang.ThreadGroup[name=javawsApplicationThreadGroup,maxpri=10] differs from originally used java.lang.ThreadGroup

I use Java 1.7, maybe this bug is caused by this one:
http://bugs.java.com/view_bug.do?bug_id=8017776
Comment 1 gouessej 2014-03-25 09:49:43 UTC
I've just tested with Oracle Java 1.8.0 b132, this bug is still reproducible.
Comment 2 janvo 2014-05-16 08:52:54 UTC
we try to deploy a netbeans platform app using webstart.
We changed the webstart plugin to exclude the local jars (BR, ja etc)
to improve sign time. 

This results in the above stack trace.
Comment 3 Martin Kozeny 2014-05-23 15:05:35 UTC
I am unable to reproduce it on:

Product Version: NetBeans IDE Dev (Build 20140523)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Linux version 3.5.0-47-generic running on amd64; UTF-8; en_US (nb)

Please what environment do you use? Could you also attach some sample project which is producing this error? Thank you.
Comment 4 Martin Kozeny 2014-07-17 14:07:51 UTC
Current state of EarlyHandler.java file is:

https://hg.netbeans.org/core-main/file/725e98325c77/uihandler/src/org/netbeans/modules/uihandler/EarlyHandler.java

so please try to use latest dev build http://bits.netbeans.org/download/trunk/nightly/latest/

Thank you.