mysql - Null pointer exception when getting the value from query in java -
i fetching value using query
select t.revision_no ( select max( convert( revision_no, signed int ) ) revision_no atps_dc date = '"+date+"' grouping convert( revision_no, signed int )) inner bring together atps_dc t on t.revision_no = r.revision_no , t.date = '"+date+"'";
and trying set value using this
ba.setrev_no(rs2.getstring("revision_no"));
but compiler giving null pointer exception. please help me, how can resolve it.
thanks in advance.
compiler doesn't give nullpointerexception
runtimeexception
, pointing ba
null
, trying invoke method on , nullpointerexception
dc_changea ba=null; ba.setrev_no(rs2.getstring("revision_no"));
try dc_changea ba = new dc_changea()
or proper initialization in place of dc_changea ba = null
see
nullpointerexception java mysql nullpointerexception
No comments:
Post a Comment