Skip to content

NullPointerException on startup (MacOS) #3888

@ThunderSOS

Description

@ThunderSOS

Apache NetBeans version

Apache NetBeans 13

What happened

I get the following output when trying to start Netbeans from the command line (bin/netbeans) then startup exits and the IDE won't run.

WARNING: package sun.awt.X11 not in java.desktop
WARNING: package com.sun.java.swing.plaf.gtk not in java.desktop
java.lang.NullPointerException
at java.base/java.net.URLConnection$1.getContentTypeFor(URLConnection.java:313)
at java.base/java.net.URLConnection.guessContentTypeFromName(URLConnection.java:1464)
at java.base/sun.net.www.protocol.jar.JarURLConnection.getContentType(JarURLConnection.java:223)
at java.base/java.net.URLConnection.getContentHandler(URLConnection.java:1277)
at java.base/java.net.URLConnection.getContent(URLConnection.java:778)
at java.base/java.net.URL.getContent(URL.java:1150)
at org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:292)
at org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:131)
at org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(MetaInfServicesLookup.java:110)
at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:458)
at org.openide.util.lookup.ProxyLookup$R.initResults(ProxyLookup.java:449)
at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:736)
at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:612)
at org.openide.util.lookup.ProxyLookup$R.allItems(ProxyLookup.java:596)
at org.openide.util.lookup.ProxyLookup$R.collImpl(ProxyLookup.java:699)
at org.openide.util.lookup.ProxyLookup$R.collectFires(ProxyLookup.java:645)
at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:228)
at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:184)
at org.netbeans.core.startup.MainLookup.changeLookups(MainLookup.java:193)
at org.netbeans.core.startup.MainLookup.doInitializeLookup(MainLookup.java:183)
at org.netbeans.core.startup.MainLookup.modulesClassPathInitialized(MainLookup.java:134)
at org.netbeans.core.startup.MainLookup.modulesClassPathInitialized(MainLookup.java:127)
at org.netbeans.core.startup.NbInstaller.loadImpl(NbInstaller.java:360)
at org.netbeans.core.startup.NbInstaller.access$000(NbInstaller.java:77)
at org.netbeans.core.startup.NbInstaller$1.run(NbInstaller.java:322)
at org.openide.filesystems.FileUtil$2.run(FileUtil.java:418)
at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:402)
at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:422)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:319)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1457)
at org.netbeans.ModuleManager.enable(ModuleManager.java:1254)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:315)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:251)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:298)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:156)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:125)
at org.netbeans.core.startup.Main.start(Main.java:282)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
at java.base/java.lang.Thread.run(Thread.java:834)

How to reproduce

Well I'd say just install manually from the zip file and try to run but I'm guessing this works for you...

Did this work correctly in an earlier version?

Apache NetBeans 12.3 or earlier

Operating System

MacOS

JDK

JDK11java version "11.0.3" 2019-04-16 LTS Java(TM) SE Runtime Environment 1Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

Every time I try to start it. Curiously it worked OK initially then stopped after a day or two. Tried to reinstall etc but just can't make it work ever since.

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions