netbeans crash during loading: java.lang.NullPointerException at org.eclipse.osgi.baseadaptor

Bug #1776937 reported by nand on 2018-06-14
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
netbeans (Ubuntu)
Undecided
Unassigned

Bug Description

This issue affects Ubuntu 18.04 LTS (Bionic Beaver)

Reproduction:
1. Install netbeans
2. Try starting netbeans

It crashes during the loading screen. In `~/.netbeans/8.1/var/logs/messages.log` I see the following:

>Log Session: Thursday, June 14, 2018 5:17:28 PM CEST
>System Info:
  Product Version = NetBeans IDE 8.1 (Build 20180221-debian-8.1)
  Operating System = Linux version 4.15.0-23-generic running on amd64
  Java; VM; Vendor = 1.8.0_171; OpenJDK 64-Bit Server VM 25.171-b11; Oracle Corporation
  Runtime = OpenJDK Runtime Environment 1.8.0_171-8u171-b11-0ubuntu0.18.04.1-b11
  Java Home = /usr/lib/jvm/java-8-openjdk-amd64/jre
  System Locale; Encoding = en_US (nb); UTF-8
  Home Directory = /home/tx1
  Current Directory = /home/tx1
  User Directory = /home/tx1/.netbeans/8.1
  Cache Directory = /home/tx1/.cache/netbeans/8.1
  Installation = /usr/share/netbeans/8.1/nb
                            /usr/share/netbeans/8.1/ide
                            /usr/share/netbeans/8.1/java
                            /usr/share/netbeans/8.1/apisupport
                            /usr/share/netbeans/8.1/harness
                            /usr/share/netbeans/8.1/platform
  Boot & Ext. Classpath = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar
  Application Classpath = /usr/share/java/jcodings.jar:/usr/share/netbeans/8.1/platform/lib/boot.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-modules.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-lookup.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-ui.jar:/usr/lib/jvm/java-8-openjdk-amd64/lib/dt.jar:/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar
  Startup Classpath = /usr/share/netbeans/8.1/platform/core/org-netbeans-libs-asm.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems.jar:/usr/share/netbeans/8.1/platform/core/asm-all-5.0.1.jar:/usr/share/netbeans/8.1/platform/core/core-base.jar:/usr/share/netbeans/8.1/platform/core/core.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems-compat8.jar:/usr/share/netbeans/8.1/nb/core/org-netbeans-upgrader.jar:/usr/share/netbeans/8.1/nb/core/locale/core_nb.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.modules.netbinox]: Install area set to file:/usr/share/netbeans/8.1/
java.lang.NullPointerException
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:123)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:192)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
    at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
    at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
    at org.netbeans.modules.netbinox.Netbinox.init(Unknown Source)
    at org.netbeans.core.netigso.Netigso.prepare(Unknown Source)
    at org.netbeans.NetigsoHandle.turnOn(Unknown Source)
    at org.netbeans.ModuleManager.enable(Unknown Source)
INFO [null]: Last record repeated again.
    at org.netbeans.core.startup.ModuleList.installNew(Unknown Source)
    at org.netbeans.core.startup.ModuleList.trigger(Unknown Source)
    at org.netbeans.core.startup.ModuleSystem.restore(Unknown Source)
    at org.netbeans.core.startup.Main.getModuleSystem(Unknown Source)
INFO [null]: Last record repeated again.
    at org.netbeans.core.startup.Main.start(Unknown Source)
    at org.netbeans.core.startup.TopThreadGroup.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:748)

Possibly related to this debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891957

I also tried stealing the netbeans 8.2 packages from debian experimental, which use openjdk-11 instead of openjdk-8, but they ran into the same issue.

The debian bug suggests it might be related to the package `libequinox-osgi-java`, but since the netbeans package is the one that I actively observe crashing, I'm filing it against this one instead.

It's worth pointing that, under some circumstances (that I don't fully understand), I can also get this error instead:

>Log Session: Thursday, June 14, 2018 at 6:20:43 PM Central European Summer Time
>System Info:
  Product Version = NetBeans IDE 8.1 (Build 20180221-debian-8.1)
  Operating System = Linux version 4.15.0-23-generic running on amd64
  Java; VM; Vendor = 10.0.1; OpenJDK 64-Bit Server VM 10.0.1+10-Ubuntu-3ubuntu1; Oracle Corporation
  Runtime = OpenJDK Runtime Environment 10.0.1+10-Ubuntu-3ubuntu1
  Java Home = /usr/lib/jvm/java-11-openjdk-amd64
  System Locale; Encoding = en_US (nb); UTF-8
  Home Directory = /home/tx1
  Current Directory = /home/tx1
  User Directory = /home/tx1/.netbeans/8.1
  Cache Directory = /home/tx1/.cache/netbeans/8.1
  Installation = /usr/share/netbeans/8.1/nb
                            /usr/share/netbeans/8.1/ide
                            /usr/share/netbeans/8.1/java
                            /usr/share/netbeans/8.1/apisupport
                            /usr/share/netbeans/8.1/harness
                            /usr/share/netbeans/8.1/platform
  Boot & Ext. Classpath =
  Application Classpath = /usr/share/java/jcodings.jar:/usr/share/netbeans/8.1/platform/lib/boot.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-modules.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-lookup.jar:/usr/share/netbeans/8.1/platform/lib/org-openide-util-ui.jar
  Startup Classpath = /usr/share/netbeans/8.1/platform/core/org-netbeans-libs-asm.jar:/usr/share/netbeans/8.1/platform/core/core.jar:/usr/share/netbeans/8.1/platform/core/core-base.jar:/usr/share/netbeans/8.1/platform/core/asm-all-5.0.1.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems-compat8.jar:/usr/share/netbeans/8.1/platform/core/org-openide-filesystems.jar:/usr/share/netbeans/8.1/nb/core/org-netbeans-upgrader.jar:/usr/share/netbeans/8.1/nb/core/locale/core_nb.jar
-------------------------------------------------------------------------------
java.lang.SecurityException: setContextClassLoader
 at java.base/jdk.internal.misc.InnocuousThread.setContextClassLoader(InnocuousThread.java:116)
 at org.netbeans.ModuleManager.updateContextClassLoaders(Unknown Source)
 at org.netbeans.ModuleManager.<init>(Unknown Source)
 at org.netbeans.core.startup.ModuleSystem.<init>(Unknown Source)
 at org.netbeans.core.startup.Main.getModuleSystem(Unknown Source)
INFO [null]: Last record repeated again.
 at org.netbeans.core.startup.Main.start(Unknown Source)
 at org.netbeans.core.startup.TopThreadGroup.run(Unknown Source)
 at java.base/java.lang.Thread.run(Thread.java:844)

Either way, I haven't managed to get the default, packaged `netbeans` to work at all. Does this work for anybody else?

agent 8131 (agent-8131) wrote :

This is going to sound like a strange fix but I've had it work on 2 systems:

download: libequinox-osgi-java_3.8.1-10_all.deb
https://packages.ubuntu.com/artful/all/libequinox-osgi-java/download

Install it with dpkg or similar)
Run netbeans. It should load.
Run sudo apt upgrade to get the bionic version back.
Run netbeans. For me it still works.

In other words something about running with 3.8.1-10 fixes whatever the issue is.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netbeans (Ubuntu):
status: New → Confirmed
Mark Jeronimus (mark-jeronimus) wrote :

Downgrading to 3.8.1-10 works!

When it automatically updates back to 3.9.1-1, NetBeans once again stops working!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers