org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'watchService': Invocation of init method failed; nested exception is java.lang.NullPointerException

Stack Overflow | Alex Woolford | 6 months ago
  1. 0

    Autowired KafkaTemplate in SpringBoot/spring-kafka application throws null pointer

    Stack Overflow | 6 months ago | Alex Woolford
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'watchService': Invocation of init method failed; nested exception is java.lang.NullPointerException
  2. 0
    Elasticsearch 1.x and 2.x nodes are not compatible, make sure your setup contains nodes of the same major version.
    via GitHub by dakrone
  3. 0
    It is a JDK bug, no workaround currently.
    via GitHub by jroper
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Some of the parametes ar enull
  6. 0
    Try looking for variables that have been declared but not created as an object on the functions described in the stack trace.

    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

      null

      at io.woolford.WatchService.monitor()
    2. io.woolford
      WatchService.watchPath
      1. io.woolford.WatchService.monitor(WatchService.java:93)[classes/:na]
      2. io.woolford.WatchService.watchPath(WatchService.java:37)[classes/:na]
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_91]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_91]
      4. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_91]
      4 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      8. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      9. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      10. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      12. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      12 frames
    5. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    6. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      5 frames
    7. io.woolford
      Application.main
      1. io.woolford.Application.main(Application.java:11)[classes/:na]
      1 frame