java.lang.NullPointerException: null

SpringSource Issue Tracker | Glyn Normington (c) | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This seems to be a different problem than when the logging level is set to TRACE as there is now no stack overflow in the most recent log file (log.log, attached). Nevertheless, shutdown is initiated although the reason is not immediately clear. There is a NPE in the attached log.log file, although this may not be relevant: [2010-01-04 14:44:44.270] kernel-dm-12 c.s.k.s.internal.CommandRegistry$CommandRegistryServiceListener < public void com.springsource.kernel.shell.internal.CommandRegistry.CommandRegistryServiceListener.serviceChanged(org.osgi.framework.ServiceEvent) java.lang.NullPointerException: null at java.util.AbstractCollection.removeAll(AbstractCollection.java:336) at com.springsource.kernel.shell.internal.CommandRegistry.serviceUnregistering(CommandRegistry.java:107) at com.springsource.kernel.shell.internal.CommandRegistry.access$1(CommandRegistry.java:104) at com.springsource.kernel.shell.internal.CommandRegistry$CommandRegistryServiceListener.serviceChanged(CommandRegistry.java:120) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:224) at org.springframework.osgi.service.exporter.support.internal.support.ServiceRegistrationDecorator.unregister(ServiceRegistrationDecorator.java:65) at org.springframework.osgi.util.OsgiServiceUtils.unregisterService(OsgiServiceUtils.java:41) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:372) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:362) at org.springframework.osgi.service.exporter.support.AbstractOsgiServiceExporter.destroy(AbstractOsgiServiceExporter.java:84) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:184) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:486) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:462) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:430) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:977) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.destroyBeans(AbstractOsgiBundleApplicationContext.java:204) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:953) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:374) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:917) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$1.run(ContextLoaderListener.java:522) at org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60) at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)

    SpringSource Issue Tracker | 7 years ago | Glyn Normington (c)
    java.lang.NullPointerException: null
  2. 0

    This seems to be a different problem than when the logging level is set to TRACE as there is now no stack overflow in the most recent log file (log.log, attached). Nevertheless, shutdown is initiated although the reason is not immediately clear. There is a NPE in the attached log.log file, although this may not be relevant: [2010-01-04 14:44:44.270] kernel-dm-12 c.s.k.s.internal.CommandRegistry$CommandRegistryServiceListener < public void com.springsource.kernel.shell.internal.CommandRegistry.CommandRegistryServiceListener.serviceChanged(org.osgi.framework.ServiceEvent) java.lang.NullPointerException: null at java.util.AbstractCollection.removeAll(AbstractCollection.java:336) at com.springsource.kernel.shell.internal.CommandRegistry.serviceUnregistering(CommandRegistry.java:107) at com.springsource.kernel.shell.internal.CommandRegistry.access$1(CommandRegistry.java:104) at com.springsource.kernel.shell.internal.CommandRegistry$CommandRegistryServiceListener.serviceChanged(CommandRegistry.java:120) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:224) at org.springframework.osgi.service.exporter.support.internal.support.ServiceRegistrationDecorator.unregister(ServiceRegistrationDecorator.java:65) at org.springframework.osgi.util.OsgiServiceUtils.unregisterService(OsgiServiceUtils.java:41) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:372) at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:362) at org.springframework.osgi.service.exporter.support.AbstractOsgiServiceExporter.destroy(AbstractOsgiServiceExporter.java:84) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:184) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:486) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:462) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:430) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:977) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.destroyBeans(AbstractOsgiBundleApplicationContext.java:204) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:953) at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214) at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:374) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:917) at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$1.run(ContextLoaderListener.java:522) at org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60) at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637)

    SpringSource Issue Tracker | 7 years ago | Glyn Normington (c)
    java.lang.NullPointerException: null

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.NullPointerException

      null

      at java.util.AbstractCollection.removeAll()
    2. Java RT
      AbstractCollection.removeAll
      1. java.util.AbstractCollection.removeAll(AbstractCollection.java:336)
      1 frame
    3. com.springsource.kernel
      CommandRegistry$CommandRegistryServiceListener.serviceChanged
      1. com.springsource.kernel.shell.internal.CommandRegistry.serviceUnregistering(CommandRegistry.java:107)
      2. com.springsource.kernel.shell.internal.CommandRegistry.access$1(CommandRegistry.java:104)
      3. com.springsource.kernel.shell.internal.CommandRegistry$CommandRegistryServiceListener.serviceChanged(CommandRegistry.java:120)
      3 frames
    4. Eclipse OSGi
      FilteredServiceListener.serviceChanged
      1. org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
      1 frame
    5. Eclipse OSGi
      BundleContextImpl.dispatchEvent
      1. org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)
      1 frame
    6. Eclipse OSGi
      ServiceRegistrationImpl.unregister
      1. org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
      2. org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
      3. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)
      4. org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)
      5. org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:224)
      5 frames
    7. Spring OSGi Core
      AbstractOsgiServiceExporter.destroy
      1. org.springframework.osgi.service.exporter.support.internal.support.ServiceRegistrationDecorator.unregister(ServiceRegistrationDecorator.java:65)
      2. org.springframework.osgi.util.OsgiServiceUtils.unregisterService(OsgiServiceUtils.java:41)
      3. org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:372)
      4. org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.unregisterService(OsgiServiceFactoryBean.java:362)
      5. org.springframework.osgi.service.exporter.support.AbstractOsgiServiceExporter.destroy(AbstractOsgiServiceExporter.java:84)
      5 frames
    8. Spring Beans
      DefaultSingletonBeanRegistry.destroySingletons
      1. org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:184)
      2. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:486)
      3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:462)
      4. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:430)
      4 frames
    9. Spring Context
      AbstractApplicationContext.destroyBeans
      1. org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:977)
      1 frame
    10. Spring OSGi Core
      AbstractOsgiBundleApplicationContext.destroyBeans
      1. org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.destroyBeans(AbstractOsgiBundleApplicationContext.java:204)
      1 frame
    11. Spring Context
      AbstractApplicationContext.doClose
      1. org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:953)
      1 frame
    12. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.normalClose
      1. org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197)
      2. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69)
      3. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214)
      4. org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      5. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210)
      5 frames
    13. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor.close
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:374)
      1 frame
    14. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.doClose
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236)
      1 frame
    15. Spring Context
      AbstractApplicationContext.close
      1. org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:917)
      1 frame
    16. org.springframework.osgi
      RunnableTimedExecution$MonitoredRunnable.run
      1. org.springframework.osgi.extender.internal.activator.ContextLoaderListener$1.run(ContextLoaderListener.java:522)
      2. org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60)
      2 frames
    17. com.springsource.kernel
      ContextPropagatingTaskExecutor$2.run
      1. com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
      1 frame
    18. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:637)
      3 frames