Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

java.lang.reflect.UndeclaredThrowableException

Hi Good Morning to All ,

I written a session bean when iam trying to deploy it, i got java.lang.reflect.UndeclaredThrowableException, Actually what am i done is..

I written a sessionbean,in that i written like this....

Object objUserCus = ctx.lookup("UserCustomer");//jndi name

objUserAssCustEntityHome = (UserAssCustEntityHome) objUserCus;

Object objCustAddr = ctx.lookup("CustomerAddress");

objCustomerAdressEntityHome = (CustomerAdressEntityHome) objCustAddr;

objCollUserCus = objUserAssCustEntityHome.findByUserId(strUserId);

Iterator it = objCollUserCus.iterator();

while (it.hasNext()) {

try { UserAssCustEntity objUserAssCustEntity =

(UserAssCustEntity) it.next();

String custid = objUserAssCustEntity.getStrCustomerId();

String saleorg = objUserAssCustEntity.getStrSalesOrg();

String distchan = objUserAssCustEntity.getStrDistrChannel();

String divi = objUserAssCustEntity.getStrDivision();

CompoundKey ck = new CompoundKey();

ck.strCustomer = custid;

ck.strSalesOrg = saleorg;

ck.strDistrChan = distchan;

ck.strDivision = divi;

try { //code for CustomerAddressDetails objCustomerAdressEntity =

(CustomerAdressEntity) objCustomerAdressEntityHome

.findByPrimaryKey(ck);

But when ever control comes to the above line it gives the java.lang.reflect.UndeclaredThrowableException,please specify how to solve it.( when will be that type of exception come)

Thanks and regards.

srinivas

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question