Hi,
Hi all im having an error java.lang.ClassCastException: java.lang.String
Does anyone have an idea on this error?
My codes are:
| TblCountryFacadeLocal myCountryBean = lookupTblCountryFacade();
| List myList = myCountryBean.findAll();
| int length = myList.size();
|
| for (int i = 0; i < length; i++) {
| TblCSCSubCategory region = (TblCSCSubCategory) myList.get(i) ;
| System.out.println((i + 1)+".
"+region.getStrName().toString());
| }
And for my Entity code is:
public List findAll() {
| return em.createQuery("select o.strCountry from TblCountry as
o").getResultList();
| }
Hope for a kind response.
Thankz :)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979249#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...