java.lang.NullPointerException

openhab.org | 3 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Recent changes to the OsgiWrapper have broken wab jars. These jars are missing the updated classfiles that contain the component binding code. Example symptom as follows: 2017-03-21 00:53:38,944 | ERROR | -message-handler | onos-gui | 158 - org.onosproject.onos-gui - 1.10.0.SNAPSHOT | [org.onosproject.ui.impl.topo.model.UiSharedTopologyModel(129)] The activate method has thrown an exception java.lang.NullPointerException at org.onosproject.ui.impl.topo.model.UiSharedTopologyModel.activate(UiSharedTopologyModel.java:152) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_121] at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_121] at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231) at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39) at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624) at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508) at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149) at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:315) at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:127) at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:871)

    JIRA | 2 months ago | Brian O'Connor
    java.lang.NullPointerException
  2. 0

    Seeing following error on startup with latest Launchpad from trunk {noformat} 20.07.2015 20:29:10.310 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory Script extension 'jspf' is now handled by ScriptEngine 'Apache Sling Scripting JSP Support', version='2.1.6', class='org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine' 20.07.2015 20:29:10.310 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory Script extension 'jspx' is now handled by ScriptEngine 'Apache Sling Scripting JSP Support', version='2.1.6', class='org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine' 20.07.2015 20:29:10.311 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core Service [361, [org.osgi.service.event.EventHandler]] ServiceEvent UNREGISTERING 20.07.2015 20:29:10.316 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core [org.apache.sling.scripting.core.impl.ScriptCacheImpl(114)] The deactivate method has thrown an exception (java.lang.IllegalStateException: Service already unregistered.) java.lang.IllegalStateException: Service already unregistered. at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:136) at org.apache.sling.scripting.core.impl.ScriptCacheImpl.deactivate(ScriptCacheImpl.java:269) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231) at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39) at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624) at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508) at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149) at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:355) at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:170) at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:929) at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:915) at org.apache.felix.framework.ServiceRegistrationImpl.ungetFactoryUnchecked(ServiceRegistrationImpl.java:384) {noformat} Looking at {{ScriptCacheImpl}} the service reg is getting unregistered at two place. So probably at {{configureCache}} it should null the reference

    Apache's JIRA Issue Tracker | 2 years ago | Chetan Mehrotra
    java.lang.IllegalStateException: Service already unregistered.
  3. 0

    Homematic Binding does not work (Solved) - Bindings - openHAB Community

    openhab.org | 6 days ago
    java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.openhab.binding.tcp.AbstractSocketChannelBinding.deactivate()
    2. org.openhab.binding
      AbstractSocketChannelBinding.deactivate
      1. org.openhab.binding.tcp.AbstractSocketChannelBinding.deactivate(AbstractSocketChannelBinding.java:718)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_65]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_65]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_65]
      4. java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_65]
      4 frames
    4. Apache Felix Declarative Services
      SingleComponentManager.ungetService
      1. org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
      2. org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
      3. org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
      4. org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
      5. org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
      6. org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:342)[32:org.apache.felix.scr:2.0.2]
      7. org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:157)[32:org.apache.felix.scr:2.0.2]
      8. org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:913)[32:org.apache.felix.scr:2.0.2]
      9. org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:902)[32:org.apache.felix.scr:2.0.2]
      9 frames
    5. Eclipse OSGi
      ServiceFactoryUse$2.run
      1. org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:260)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      2. org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:1)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      2 frames
    6. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)[:1.8.0_65]
      1 frame
    7. Eclipse OSGi
      BundleContextImpl.ungetService
      1. org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:258)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      2. org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.ungetService(ServiceFactoryUse.java:160)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      3. org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.ungetService(ServiceConsumer.java:50)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      4. org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:581)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      5. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ungetService(ServiceRegistry.java:540)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      6. org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:661)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      6 frames
    8. Apache Felix Metatype Service
      ManagedServiceTracker.addingService
      1. org.apache.felix.metatype.internal.ManagedServiceTracker.addingService(ManagedServiceTracker.java:61)[2:org.apache.felix.metatype:1.1.2]
      1 frame
    9. OSGi
      ServiceTracker$Tracked.serviceChanged
      1. org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:]
      2. org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]
      3. org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]
      4. org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]
      5. org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)[org.osgi.core-6.0.0.jar:]
      5 frames
    10. Eclipse OSGi
      BundleContextImpl.registerService
      1. org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      2. org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      3. org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      4. org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      5. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      6. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      7. org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      8. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      9. org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      9 frames
    11. Apache Felix Declarative Services
      BundleComponentActivator$ListenerInfo.serviceChanged
      1. org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:869)[32:org.apache.felix.scr:2.0.2]
      2. org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:857)[32:org.apache.felix.scr:2.0.2]
      3. org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)[32:org.apache.felix.scr:2.0.2]
      4. org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:915)[32:org.apache.felix.scr:2.0.2]
      5. org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:715)[32:org.apache.felix.scr:2.0.2]
      6. org.apache.felix.scr.impl.manager.DependencyManager$SingleDynamicCustomizer.addedService(DependencyManager.java:753)[32:org.apache.felix.scr:2.0.2]
      7. org.apache.felix.scr.impl.manager.DependencyManager$SingleDynamicCustomizer.addedService(DependencyManager.java:700)[32:org.apache.felix.scr:2.0.2]
      8. org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)[32:org.apache.felix.scr:2.0.2]
      9. org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)[32:org.apache.felix.scr:2.0.2]
      10. org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)[32:org.apache.felix.scr:2.0.2]
      11. org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)[32:org.apache.felix.scr:2.0.2]
      12. org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)[32:org.apache.felix.scr:2.0.2]
      13. org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)[32:org.apache.felix.scr:2.0.2]
      13 frames
    12. Eclipse OSGi
      EventManager.dispatchEvent
      1. org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      2. org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      3. org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
      3 frames