-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.lang.reflect.InvocationTargetException
PostPosted: Mon Jul 28, 2008 3:09 pm 
Newbie

Joined: Wed Jul 23, 2008 3:51 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.