java.lang.NullPointerException: null

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.NullPointerException: null

    Root Cause Analysis

    1. java.lang.NullPointerException

      null

      at com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker.<init>()
    2. druid
      DruidDataSource.getConnection
      1. com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker.<init>(MySqlValidConnectionChecker.java:50)[druid-1.0.18.jar:1.0.18]
      2. com.alibaba.druid.pool.DruidDataSource.initValidConnectionChecker(DruidDataSource.java:944)[druid-1.0.18.jar:1.0.18]
      3. com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:659)[druid-1.0.18.jar:1.0.18]
      4. com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:986)[druid-1.0.18.jar:1.0.18]
      5. com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:982)[druid-1.0.18.jar:1.0.18]
      6. com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:102)[druid-1.0.18.jar:1.0.18]
      6 frames
    3. com.github.pagehelper
      PageHelper.intercept
      1. com.github.pagehelper.PageHelper.getUrl(PageHelper.java:281)[pagehelper-4.1.1.jar:na]
      2. com.github.pagehelper.PageHelper.getSqlUtil(PageHelper.java:305)[pagehelper-4.1.1.jar:na]
      3. com.github.pagehelper.PageHelper.initSqlUtil(PageHelper.java:263)[pagehelper-4.1.1.jar:na]
      4. com.github.pagehelper.PageHelper.intercept(PageHelper.java:250)[pagehelper-4.1.1.jar:na]
      4 frames
    4. MyBatis
      Plugin.invoke
      1. org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)[mybatis-3.3.0.jar:3.3.0]
      1 frame
    5. com.sun.proxy
      $Proxy69.query
      1. com.sun.proxy.$Proxy69.query(Unknown Source)[na:na]
      1 frame
    6. MyBatis
      DefaultSqlSession.selectList
      1. org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)[mybatis-3.3.0.jar:3.3.0]
      2. org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)[mybatis-3.3.0.jar:3.3.0]
      2 frames
    7. 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
    8. MyBatis-Spring
      SqlSessionTemplate$SqlSessionInterceptor.invoke
      1. org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:386)[mybatis-spring-1.2.3.jar:1.2.3]
      1 frame
    9. com.sun.proxy
      $Proxy41.selectList
      1. com.sun.proxy.$Proxy41.selectList(Unknown Source)[na:na]
      1 frame
    10. MyBatis-Spring
      SqlSessionTemplate.selectList
      1. org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205)[mybatis-spring-1.2.3.jar:1.2.3]
      1 frame
    11. MyBatis
      MapperProxy.invoke
      1. org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)[mybatis-3.3.0.jar:3.3.0]
      2. org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)[mybatis-3.3.0.jar:3.3.0]
      3. org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)[mybatis-3.3.0.jar:3.3.0]
      3 frames
    12. com.sun.proxy
      $Proxy54.selectAll
      1. com.sun.proxy.$Proxy54.selectAll(Unknown Source)[na:na]
      1 frame
    13. me.carambola.blog
      Application.run
      1. me.carambola.blog.Application.run(Application.java:33)[main/:na]
      1 frame
    14. 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
    15. me.carambola.blog
      Application.main
      1. me.carambola.blog.Application.main(Application.java:27)[main/:na]
      1 frame
    16. 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
    17. 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