ssh整合出现了错

[2011-25-13 21:25:04] ERROR - com.ziboyanhua.oa.user.dao.imp.YhuserDAO -com.ziboyanhua.oa.user.dao.imp.YhuserDAO.save(YhuserDAO.java:45)  -save failed
java.lang.NullPointerException
 at com.ziboyanhua.oa.user.dao.imp.YhuserDAO.save(YhuserDAO.java:41)
 at com.ziboyanhua.oa.user.service.imp.UserServiceImp.insert(UserServiceImp.java:14)
 at com.ziboyanhua.oa.user.service.imp.UserServiceImp.main(UserServiceImp.java:21)
Exception in thread "main" java.lang.NullPointerException
 at com.ziboyanhua.oa.user.dao.imp.YhuserDAO.save(YhuserDAO.java:41)
 at com.ziboyanhua.oa.user.service.imp.UserServiceImp.insert(UserServiceImp.java:14)
 at com.ziboyanhua.oa.user.service.imp.UserServiceImp.main(UserServiceImp.java:21)

2个回答

UserServiceImp u=new UserServiceImp();
这句话是亮点

空指针异常,自己检查下.YhuserDAO.save 有可能YhuserDAO为空或者save方法中的对象为空.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问