Hi,
I Got this error in The Following Code
public static Host getOrNullHost(Class clazz, Object... parameterPairs)
{
//List rslist=new ArrayList();
String host_id=new String();
try
{
PreparedStatement ps = PO.prepareJDBCStatement("SELECT host_id from host WHERE ip_address='"+parameterPairs[1] +"' ORDER BY host_id".toString());
ResultSet rs=ps.executeQuery();
while(rs.next())
{
host_id=rs.getString(1);
}
}
catch(SQLException ex)
{
throw new UndeclaredThrowableException(ex);
}
Serializable serialID=Integer.parseInt(host_id);
Host host=(Host)getThreadSession().get(Host.class, serialID);
getThreadSession().flush();
return host;
}
The Above Code is running well in the 1st Phase, But in The second phase it Show the above Exception.At the Bold Line
Any one please help
kind Regards
Khirod
|