java.lang.IllegalStateException: Failed to execute CommandLineRunner

segmentfault.com | 3 weeks 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

    java - springboot集成mybaits,druid报错 - SegmentFault

    segmentfault.com | 3 weeks ago
    java.lang.IllegalStateException: Failed to execute CommandLineRunner

    Root Cause Analysis

    1. java.lang.ClassCastException

      me.carambola.blog.entity.User cannot be cast to me.carambola.blog.entity.User

      at me.carambola.blog.Application.run()
    2. me.carambola.blog
      Application.run
      1. me.carambola.blog.Application.run(Application.java:34)[main/:na]
      1 frame
    3. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:806)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      2. org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:790)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      3. org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:777)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:308)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)[spring-boot-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      6 frames
    4. me.carambola.blog
      Application.main
      1. me.carambola.blog.Application.main(Application.java:27)[main/:na]
      1 frame
    5. 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
    6. org.springframework.boot
      RestartLauncher.run
      1. org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)[spring-boot-devtools-1.3.5.RELEASE.jar:1.3.5.RELEASE]
      1 frame