java.lang.reflect.InvocationTargetException in Java
<pre><code>if(locs!=null)
{
    System.out.println("location are not null");
    Iterator ite = locs.iterator();
    DefaultComboItem locObj = null;
    ArrayList locCode = null;
    String cod=null;
    String name=null;
    while(ite.hasNext())
    {
        locCode = (ArrayList) ite.next();
        Iterator iter = locCode.iterator();
        while(iter.hasNext())
        {
            cod=(String)iter.next();
            System.out.println("Code="+cod);
            name=(String)iter.next();
            System.out.println("name="+name);
            locObj = new DefaultComboItem(cod, name);
            colRet.add(locObj);
        }
    }

}
</code></pre>

<p>on executing above code i am getting "java.lang.reflect.InvocationTargetException"
getting this exception on 
 cod=(String)iter.next();
line, because iter.next(); returns bigDecimal value and i am converting into String variable</p>

<p>Please help me</p>
