标签:style blog io color java sp strong div on
public class HbaseCommon implements ConstantFields, Serializable { private static final long serialVersionUID = -4381143654627578634L; private final Logger LOG = Logger.getLogger(this.getClass());
log4j没有Serializable接口,在序列化这个类时报:java.io.NotSerializableException: org.apache.log4j.Logger
解决:换成slf4j,因为slf4j实现了序列化接口
Logger LOG = LoggerFactory.getLogger(HbaseCommon.class);
标签:style blog io color java sp strong div on
原文地址:http://www.cnblogs.com/muzhongjiang/p/4073239.html