原因:本该导入import org.apache.log4j.Logger; 结果成了import java.util.logging.Logger;

如果硬把private static Logger logger = Logger.getLogger(InsertPersons.class); 修改成private static Logger logger = Logger.getLogger("XXX");

控制台输出还可能变成红色字,即使是正常的输出信息。

要解决它把包删了重新导入正确的就好了。

--END--

2019年10月5日16:08:26

[log4j]Error:The method getLogger(String) in the type Logger is not applicable for the arguments的更多相关文章

  1. The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)

    1. 问题 看到这个错误以为是貌似jsp页面有误,c:forTokens标签用错了?? An error occurred at line: in the jsp file: /WEB-INF/pag ...

  2. The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)

    The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the ...

  3. (转)eclipse 报错 :The method list(String, Object[]) is ambiguous for the type BaseHibernateDao

    背景:在开发过程中,经常遇到各种各样的编译问题,不断的总结,才能更好的提高效率. 描述 [报错] :The method list(String, Object[]) is ambiguous for ...

  4. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

  5. 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment)

    Fragment newfragment =new MyFragment();fragmentTransaction.replace(R.layout.activity_main,newfragmen ...

  6. The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (new View.OnClickListener(){}, String, int)

    package comxunfang.button; import android.support.v7.app.ActionBarActivity; import android.os.Bundle ...

  7. The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV

    在当前短信内容的activity中写            Bundle bun = new Bundle();         bun.putString("message",  ...

  8. The method load(Class, Serializable) in the type HibernateTemplate is not applicable for the arguments (Class, int)

    引入别人的项目发现利用HibernateTemplate的load的方法报错了.错误提示为: The method load(Class, Serializable) in the type Hibe ...

  9. MySQL Error:Warning: (1366, "Incorrect string value: '\\xF0\\x9F\\x98\\x82\\xF0\\x9F...' for column 'xxx' at row 2")

    bug现象 使用连接数据库的可视化软件插入 emoj 表情数据.生僻字,可以正常插入.(导致我一直以为跟表情没有任何关系,谷歌出来一堆跟修改数据库.表.字段 的编码的结果....)但是一启动程序插入新 ...

随机推荐

  1. JSP 内置对象的说明

    1 page:指的是当前的JSP页面本身,它是java.lang.object类的对象 2 config对象:它是ServletConfig类的一个实例 3 exception对象:它是java.la ...

  2. 9.EL表达式 和 JSTL核心标签库

    EL表达式 1./*获取数据*/ (某个web域中的对象,访问javabean的属性.访问List集合.访问Map集合.访问数组) <html> <head> <titl ...

  3. SpringMVC【二、项目搭建】

    HelloWorld搭建 1.用Maven WebApp框架创建一个项目 红框中的是后添加的 2.添加pom引用(此处因为要引用多个spring包,建议把版本号提出来放到Properties) 会导入 ...

  4. 程序面试题——C实现

    平台:win10 x64 +VC6.0 2019/5/22 1.合并三个有序的链表 链表节点定义struct node{    int val;    struct node* next;}; str ...

  5. davinci 删除路线站点关系

    删除路线站点关系 DELETE FROM tb_station_info_draw WHERE id in (SELECT stationId FROM tb_road_station_relatio ...

  6. 从Windows文件夹到Linux分区

    1. 先说几句 如果你, 知道什么是Windows系统 简单使用Windows系统 想要了解或安装Linux 刚接触Linux会有以下疑惑, 什么是分区? 如何建立分区? 怎么安装系统到到D盘? 安装 ...

  7. iTerm2快速SSH连接并保存密码

    背景 Mac自带terminal,以及比较好用的iTerm2命令行工具,都缺乏一个功能,就是远程SSH连接,无法保存密码.一种方法是将本机的ssh_key放到远程服务器中实现无密码登录.这种方法在很多 ...

  8. 通过快捷方式lnk获得文件真实路径

    通过快捷方式.lnk获得文件真实路径前提最近开发资源管理,需要预先上传大量资源,负责整理资源的同学因为空间不足,直接用快捷键方式整理视频资源OTZ,所以只能想办法通过.lnk文件获得文件的真实地址. ...

  9. 区块链火爆,再不知道Golang就晚了

    Golang,也叫Go语言,是2009年刚刚被发发布的一门新语言. 区块链,是2019年我国提出的新战略. 一个不争的事实就是,大多数从事区块链开发的小伙伴都是用Golang,大多数招聘区块链技术工作 ...

  10. CF 976F 递增容量最大流

    给你一个二分图 要求你求出对于k=[0~Mindegree] 每个点的度数至少为k所需要的最少边数 并输出方案 如果是单个询问的话 直接跑一个下界网络流即可 但是有多个询问 重建图强行跑不行 反过来考 ...