NPE stack traces in OpenHAB_runtime startup

  • Platform information:
    • Hardware: MacBook Pro
    • OS: OSX
    • Java Runtime Environment: 1.8xx
    • openHAB version: 2.3-SNAP
  • Issue of the topic: huge NPE traces launching OpenHAB_runtime

Seems lately startup in IDE creates rather large NPE traces while thing handler factories are being created (seems one for each factory being created). Anyone know what causes that?

!ENTRY org.eclipse.smarthome.core.thing 4 0 2018-05-08 01:23:36.095
!MESSAGE [org.eclipse.smarthome.core.thing.internal.ThingManager(220)] The addThingHandlerFactory method has thrown an exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.smarthome.core.thing.internal.ThingManager.getBundleName(ThingManager.java:978)
	at org.eclipse.smarthome.core.thing.internal.ThingManager.addThingHandlerFactory(ThingManager.java:936)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229)
	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650)
	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506)
	at org.apache.felix.scr.impl.inject.BindMethod.invoke(BindMethod.java:658)
	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1722)
	at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:1556)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:261)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:109)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
	at java.security.AccessController.doPrivileged(Native Method)

Doesn’t seem to affect startup, just irritating…

Cheers,
-Th

You didn’t mention the build #

If 1271, maybe related to = OH 2.3 S1271 / addThing HandlerFactory NPE - #3 by Kai

Hi @Dim, thanks for helping out.

I’m using the IDE with the default setup, and updating the OpenHAB.target definition helped with the above NPE. There was another exception related to DefaultSiteMapProvider not implementing an abstract method, which I solved by using the workspace version of ‘org.openhab.core’ instead of the target platform.

However, this brings up a question: The current target def in the IDE devel setup looks like as if it uses a URL for 2.2.x for OpenHAB core (and not sure about the deps.runtime URL).

What’s the proper URL’s (and any other changes?) to use 2.3.x snapshot builds in the target definition of the IDE?

Thanks!
-Th

not sure… :frowning:

I don’t have experience with the IDE… maybe someone else can help here.

I don’t see 2.3 on http://dl.bintray.com/openhab/p2/openhab-core/

Yeah, I had checked there too. I thought I remember a post by @Kai that bintray didn’t allow snapshot builds on their servers, and thus the snapshots were moved, but can’t seem to find that post now. Maybe it was unrelated.

I wonder if the Eclipse IDE install scripts could be updated to use those builds (or at least the IDE website how to set the IDE to use snapshot builds).

Thank you for your help, tho,
-Th

maybe this one: Online Repo for Snapshots has moved to Artifactory
(not sure)

https://openhab.jfrog.io/openhab/online-repo-snapshot/2.3/