解决过程:

1、检查配置,反反复复看了很多遍,确认没有问题。

2、 网上找了很多资料,类似的问题很多,看过答案以后依旧不得其要领。只好继续看报错代码,直到看到这一句:

1
2
3
4
Caused by: java.lang.NullPointerException
    at ***.***.SearchIPAttributionService.load(SearchIPAttributionService.java:133)
    at ***.***.SearchIPAttributionService.load(SearchIPAttributionService.java:66)
    at ***.***.SearchIPAttributionService.<clinit>(SearchIPAttributionService.java:28)

问题应该在本身的代码上,但是,我记得代码是测试过的,没有问题。但是,没有其他办法,只能顺着提示一步步寻找问题所在。最终,确实问题出在代码上。Spring在实例化这个类的时候,先执行静态方法,此时某个类还未实例化,故而报了这个空指针错误

经验教训:

1、解决问题,不要急躁,要淡定,淡定,淡定。

2、仔细看报错信息。

3、每次修改过代码以后,都要记得进行测试,确保修改是正确的。

项目启动时报错Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError的更多相关文章

  1. spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

    spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web serv ...

  2. 异常:Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: com.google.common.base.Preconditions.che ckState(ZLjava/lang/String;I)V

    Instantiation of bean failed; nested exception is java.lang.NoSuchMethodError: com.google.common.bas ...

  3. springboot启动报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError

    最近在用springboot构建项目,控制台报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError, ...

  4. dubbo-Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

    dubbo-2.8.4需用jdk版本为1.8,dubbo-2.5.3可以使用1.7版本的jdk.

  5. Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type

    问题描述 将项目挂载到 Myeclipse 的 tomcat 上,启动 tomcat ,报错“Initialization of bean failed; nested exception is ja ...

  6. Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework

    昨晚在 使用spring aop, 然后Tomcat启动的时候, 报了这么个错: Caused by: org.springframework.beans.factory.BeanCreationEx ...

  7. Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeExcep

    body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...

  8. Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/jms/JMSContext

    参考链接 : https://blog.csdn.net/angus_Lucky/article/details/82811946?utm_source=blogxgwz7 org.springfra ...

  9. QA:Initialization of bean failed; nested exception is java.lang.AbstractMethodError

    Q: <hibernate.version>5.2.10.Final</hibernate.version><dependency> <groupId> ...

随机推荐

  1. acm 2032

    ////////////////////////////////////////////////////////////////////////////////#include<iostream ...

  2. Python的方法和语法解释

    ---------------------------------------------------------------------------------------------------- ...

  3. [Wannafly挑战赛28][B msc和mcc][预处理+枚举]

    链接:https://ac.nowcoder.com/acm/contest/217/B来源:牛客网 msc和mcc 题目描述 msc和mcc是一对好朋友,有一天他们得到了一个长度为n的字符串s. 这 ...

  4. hdu1695 GCD 容斥原理

    Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) ...

  5. redux笔记 进阶

    1 拆分UI组件和容器组件 import React from 'react' const AppUI = (props) =>{ return ( <div className=&quo ...

  6. hibernate(一)

      hibernate介绍 jdbc缺点 1代码结构防繁琐,面向纯sql语句的编程,对于查询而言只要查询数据库的一张表,不需有如下编码 2有connection缓存,没有数据缓存 3.事务自动开启,有 ...

  7. JDBC事务的处理-----模拟银行转账业务

    定义: 数据库事务(简称:事务)是数据库管理系统执行过程中的一个逻辑单位,由一个有限的数据库操作序列构成. 概要: 一个数据库事务通常包含了一个序列的对数据库的读/写操作.它的存在包含有以下两个目的: ...

  8. ORM 创建manytomay的三种方法 反向查询 和一些 双下方法版学员管理系统3

    老师信息管理   三种创建多对对外键的方式常用第二种和第三种 思考 三种方式创建多对多外键方式及其优缺点. 外键的查询和使用 1外键的创建: 在数据库表中的表现形式 如何连表查询和使用 表里边:  s ...

  9. tessellate Architecture

    转自:https://zalando-incubator.github.io/tessellate/ Tessellate consists of two major components: the ...

  10. ASP.NET WebApi使用Swagger生成api说明文档

    最近做的项目使用mvc+webapi(非.Net Core),采取前后端分离的方式,后台提供API接口给前端开发人员.这个过程中遇到一个问题后台开发人员怎么提供接口说明文档给前端开发人员,最初打算使用 ...