1. Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.ObjectMapper

java找jar包的网址 http://search.maven.org/

按照ArtifactId查询

2. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
   SLF4J: Defaulting to no-operation (NOP) logger implementation
   SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

网上搜了一下下面是官方的解答http://www.slf4j.org/codes.html#StaticLoggerBinder

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar,slf4j-simple.jarslf4j-log4j12.jarslf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

You can download SLF4J bindings from the project download page.

大意是org.slf4j.impl.StaticLoggerBinder 无法载入到内存,原因是没有找到合适的绑定SLF4J,需要添加所列举的包中的某一个。

解决方法如下:

下载slf4j-nop.jar,添加到路径中,就解决问题了

3. Caused by: java.net.UnknownHostException: bogon

   连接虚拟机连接不上,试了下主机和虚拟机之间能ping通,而且CentOs防火墙关闭了 还是提示该错误,在虚拟机里启动tomcat主机也访问不了,修改/etc/下 hosts文件,

  127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  127.0.0.1 bogon.localdomain bogon

  加上了最后一行,感觉bogon是java的应用的主机名,加上后重启主机可以访问tomcat了,但是报了

  Caused by: java.net.UnknownHostException: localhost.localdomain 错误

  从新看了下 执行hostname 命令得到的主机名是localhost.localdomain 在网上找了修改主机名的命令

     hostnamectl set-hostname localhost #修改成了localhost主机名

    网上有修改/etc/hosts文件和修改/etc/sysconfig/network文件的貌似都不好使

4. Caused by: java.net.ConnectException: Connection refused: connect

   java报错最上面是异常 下面有Caused by 看到异常先猜下啥问题,看第一个Caused by 有个报错 Connection.java:148 下面那个Caused by 最后                      是 Connection.java:142 下面的是引起错误的原因 其实找错误特别是导入的jar包里的错误 应该先把你导的jar包的源文件的jar也下载下来,然后用eclipse载入进来,这       样,查错更方便,不要瞎猜。

   然后找到出错的这段代码

public InetSocketAddress(String hostname, int port) {
checkHost(hostname);
InetAddress addr = null;
String host = null;
try {
addr = InetAddress.getByName(hostname);
} catch(UnknownHostException e) {
host = hostname;
}
holder = new InetSocketAddressHolder(host, addr, checkPort(port));
}

    可以看到 UnknownHostException 这是之前报的错误 这回报错的是 InetAddress.getByName(hostname),所以还是和hostname有关系 看了下自己的host文件

    

    咨询了下@韦爵爷

    

    韦爵爷(1249314359) 15:59:15
    你要把 虚拟机的ip和hostname写到 hosts里

      例如   192.168.11.11   hostname 
           你自己本地也叫localhost ,你原来那样整不就访问你的本地了么,根本访问不了 虚拟机
  修改成了这样
    

   

    韦爵 2015/5/8 16:21:23
    还有你自己Windows本地hosts也得加上这一行
    韦爵 2015/5/8 16:21:43
    要不他那知道weiguoyuan是什么 
       于是又修改了 C:\Windows\System32\drivers\etc 下的hosts文件 加上后面一行

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost 192.168.253.128 weiguoyuan

    运行程序 终于搞定了

jodis遇到的问题的更多相关文章

  1. <codis><jodis>

    Overview For codis and jodis. Codis TBD... Jodis Java client for codis. Jodis is a java client for c ...

  2. Codis——分布式Redis服务的解决方案

    Codis——分布式Redis服务的解决方案 之前介绍过的 Twemproxy 是一种Redis代理,但它不支持集群的动态伸缩,而codis则支持动态的增减Redis节点:另外,官方的redis 3. ...

  3. codis集群安装

    在网上找了很多codis的集群安装方法,看起来都是大同小异,本人结合了大多种方法完成了一套自己使用的codis的集群安装,可以供大家学习使用,如果有什么问题或者不懂的地方欢迎指正 1.集群规划: 三台 ...

  4. 伪集群zookeeper模式下codis的部署安装

    1,zookeeper伪集群部署     部署在192.168.0.210服务器上          下载     去官网将3.4.6版本的zookeeper下载下来到/app目录下解压     首先 ...

  5. Ping CAP CTO、Codis作者谈redis分布式解决方案和分布式KV存储

    此文根据[QCON高可用架构群]分享内容,由群内[编辑组]志愿整理,转发请注明出处. 苏东旭,Ping CAP CTO,Codis作者 开源项目Codis的co-author黄东旭,之前在豌豆荚从事i ...

  6. [转载] Codis作者黄东旭细说分布式Redis架构设计和踩过的那些坑们

    原文: http://mp.weixin.qq.com/s?__biz=MzAwMDU1MTE1OQ==&mid=208733458&idx=1&sn=691bfde670fb ...

  7. Codis 集群搭建

    Codis 集群搭建 1 安装go1.3.1 CentOS 7.0 安装go 1.3.1 1.1 下载go安装包 golang中国上下载 下载到Downloads下 1.2 解压 tar -zxf g ...

  8. static 静态代码块 动态代码块 单例

    1. 共享,不属于对象,属于类,类成员变量,任何一个类的对象都有该属性,一旦被修改,则其他对象中的该属性也被更改. 2. 类中方法是static的,可以通过类名直接访问,不用new一个该类的对象. 3 ...

  9. codis3.1集群搭建

    Codis31搭建 codis 3.1 安装搭建 一.基本信息 1. 服务器基本信息 ip地址 安装服务 172.16.200.71 zk1.codis-dashboard.codis-fe.codi ...

随机推荐

  1. ubuntu14.04 server 安装docker

    安装docker服务 $ curl -sSL https://get.docker.com/ | sh   $ ocker run hello-world 测试docker是否安装成功 ubuntu ...

  2. 转: HTTP Live Streaming直播(iOS直播)技术分析与实现

    http://www.cnblogs.com/haibindev/archive/2013/01/30/2880764.html HTTP Live Streaming直播(iOS直播)技术分析与实现 ...

  3. [Angular] Tree shakable provider

    When we create a Service, Angluar CLI will helps us to add: @#Injectable({ providedIn: 'root' }) It ...

  4. PostgreSQL学习资料

    我的PostgreSQL学习笔记:http://note.youdao.com/share/?id=2e882717fc3850be9af503fcc0dfe7d0&type=notebook ...

  5. EffectManager

    using UnityEngine; using System.Collections; public class EffectManager : MonoBehaviour { public Ani ...

  6. 长sql 语句拼接

    长sql 语句拼接

  7. Idea Cannot import to svn: Cannot run program "svn"

    svn 出此问题:意味着不可检出代码. 按此修改,重启IDEA即可检出svn代码.

  8. XX年年终总结---重新飞跃

    XX年年终总结---重新飞跃 写之前先解释一下为什么是年终总结,由于在提高班学习,每年结束于暑假:新的一年開始于9月. 肚子里的墨水已经找不到新的词语来形容时间过得快了,一年结束了.还有一年又结束了: ...

  9. C#中怎样将List&lt;自己定义&gt;转为Json格式 及相关函数-DataContractJsonSerializer

    对C#和.net使用List<自己定义>和Json格式相互转化的方法进行总结 关于JSON的入门介绍见http://www.json.org/ ,或者百度,这里不赘述,只是通过以下的样例会 ...

  10. 自己动手制作更好用的markdown编辑器-01

    这里文章都是从个人的github博客直接复制过来的,排版可能有点乱. 原始地址  http://benq.im   文章目录 1. 简介 2. 项目结构 3. 程序主界面 4. 拖动窗口 5. app ...