java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

GitHub | bahadyr | 3 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd . Or join the community to write better ones.
  1. 0
    samebug tip
    The solution is to run as root using sudo or to set different port in "application.properties" file, e.g. server.port=${port:8181}
  2. 0
    samebug tip
    JHipster only supports java 7 and 8.
    via GitHub by atomfrede
  3. 0

    Unsatisfied dependency expressed through field (Spring Boot v 1.5.1)

    Stack Overflow | 1 month ago | utsav anand
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gmailPullService': Unsatisfied dependency expressed through field 'gmailMailDataRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gmailMailDataRepositoryImpl': Unsatisfied dependency expressed through field 'mongoTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappingMongoConverter' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfiguration.class]: Unsatisfied dependency expressed through method 'mappingMongoConverter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoMappingContext' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDataAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.StackOverflowError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    1.4 doesnt work

    GitHub | 3 months ago | VyaraGGeorgieva
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerMapping]: Factory method 'resourceHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.BeanInitializationException: Failed to init ResourceHttpRequestHandler; nested exception is java.lang.IllegalStateException: WebApplicationObjectSupport instance [ResourceHttpRequestHandler [locations=[class path resource [resources/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@2e2a1bdc]]] does not run within a ServletContext. Make sure the object is fully configured!
  6. 0

    Error while running "Building a RESTful Web Service"

    Stack Overflow | 2 months ago | bbd
    org.springframework.beans.factory.UependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class pathorg/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied depenssed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframewortory.BeanCreationException: Error creating bean with name 'validator' defined in class path resource [oamework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method fai exception is javax.validation.ValidationException: Unable to instantiate Configuration. 2017-02-22 23:38:16.652 ERROR 2012 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Des on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProce an exception java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before muevents via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicatio9af9a9: startup date [Wed Feb 22 23:38:15 EST 2017]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticastepplicationContext.java:404) [spring-context-4.3.6.RELEASE.jar!/:4.3.6.RELEASE] at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestructionnListenerDetector.java:97) ~[spring-context-4.3.6.RELEASE.jar!/:4.3.6.RELEASE] at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapte ~[spring-beans-4.3.6.RELEASE.jar!/:4.3.6.RELEASE]
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.io.FileNotFoundException

    /app.war!/WEB-INF/lib/bootstrap-3.3.7.jar (No such file or directory)

    at java.util.zip.ZipFile.open()
  2. Java RT
    JarFile.<init>
    1. java.util.zip.ZipFile.open(Native Method)
    2. java.util.zip.ZipFile.<init>(ZipFile.java:219)
    3. java.util.zip.ZipFile.<init>(ZipFile.java:149)
    4. java.util.jar.JarFile.<init>(JarFile.java:166)
    5. java.util.jar.JarFile.<init>(JarFile.java:130)
    5 frames
  3. org.webjars.urlprotocols
    JarUrlProtocolHandler.getAssetPaths
    1. org.webjars.urlprotocols.JarUrlProtocolHandler.getAssetPaths(JarUrlProtocolHandler.java:36)
    1 frame
  4. org.webjars
    WebJarAssetLocator.<init>
    1. org.webjars.WebJarAssetLocator.getAssetPaths(WebJarAssetLocator.java:91)
    2. org.webjars.WebJarAssetLocator.getFullPathIndex(WebJarAssetLocator.java:121)
    3. org.webjars.WebJarAssetLocator.<init>(WebJarAssetLocator.java:152)
    3 frames
  5. Spring MVC
    WebMvcConfigurationSupport.resourceHandlerMapping
    1. org.springframework.web.servlet.resource.WebJarsResourceResolver.<init>(WebJarsResourceResolver.java:52)
    2. org.springframework.web.servlet.config.annotation.ResourceChainRegistration.getResourceResolvers(ResourceChainRegistration.java:108)
    3. org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration.getRequestHandler(ResourceHandlerRegistration.java:164)
    4. org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry.getHandlerMapping(ResourceHandlerRegistry.java:122)
    5. org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.resourceHandlerMapping(WebMvcConfigurationSupport.java:448)
    5 frames
  6. Spring Boot AutoConfigure
    WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$cb97aa79$$FastClassBySpringCGLIB$$23ebded4.invoke
    1. org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$cb97aa79.CGLIB$resourceHandlerMapping$37(<generated>)
    2. org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$cb97aa79$$FastClassBySpringCGLIB$$23ebded4.invoke(<generated>)
    2 frames
  7. Spring Core
    MethodProxy.invokeSuper
    1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    1 frame
  8. Spring Context
    ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
    1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
    1 frame
  9. Spring Boot AutoConfigure
    WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$cb97aa79.resourceHandlerMapping
    1. org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$cb97aa79.resourceHandlerMapping(<generated>)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  11. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1127)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    11. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:778)
    11 frames
  12. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
    2 frames
  13. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)
    3. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
    4 frames
  14. com.teammachine.staffrostering
    ShiftworkApp.main
    1. com.teammachine.staffrostering.ShiftworkApp.main(ShiftworkApp.java:70)
    1 frame
  15. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  16. Spring Boot Loader
    WarLauncher.main
    1. org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
    2. org.springframework.boot.loader.Launcher.launch(Launcher.java:104)
    3. org.springframework.boot.loader.Launcher.launch(Launcher.java:61)
    4. org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:61)
    4 frames