当前位置: 代码迷 >> Java Web开发 >> Exception occurred during processing request: null异常!求大神来看看,代码,异常都贴上了
  详细解决方案

Exception occurred during processing request: null异常!求大神来看看,代码,异常都贴上了

热度:213   发布时间:2016-04-13 22:33:31.0
Exception occurred during processing request: null错误!求大神来看看,代码,错误都贴上了~
报错的代码
public void addMusic(Music music){
conn = DBUtil.getCon();
String sql = "insert into tb_music(musicName,singer,size) values(?,?,?)";
try {
ps = conn.prepareStatement(sql);
ps.setString(1, music.getMusicName());
ps.setString(2, music.getSinger());
ps.setString(3, music.getSize());
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {

DBUtil.closeStatement(ps);
DBUtil.closeCon(conn);
}
}


	public String addMusic(){
musicDao.addMusic(music);
return "musicQuerySuccess";
}


------解决思路----------------------
错误很明显,music 没有值
  相关解决方案