public void run() {
try {
message = null;
while ( (message = reader.readLine()) != null ) {
System.out.println("客户端消息: " + message);
System.out.println("消息长度: " + message.length());
//////m = mfact.parseMessage(message.getBytes(), 26);
PosType admin = new PosType();
admin.setAdmin("1111");
admin.setAdmin2("111");
admin.setPos_type("1111");
admin.setPos_src("1111");
admin.setNy_date(GetDateTime.DateToMySqlDate());
admin.setNy_date2(GetDateTime.DateToMySqlDate());
admin.setNy_key(DigestUtils.md5Hex(GetDateTime.ny_id_20() ));
admin.setTxt("无");
dao.fastInsert(admin);
}
} catch (IOException e) { e.printStackTrace(); log.debug("异常一");}
catch (Exception e) {
e.printStackTrace();
log.debug("异常二" + e);
}
}
java.lang.NullPointerException
at net.wendal.nutzbook.pos.PosZiThread.run(PosZiThread.java:82)
at java.lang.Thread.run(Unknown Source)
为啥不好用呢