hi folks,

how to catch the following exception in the  bean.

java.sql.SQLException: ORA-02291: integrity constraint
(PS.REFCONTACTDETAILS372) violated - parent key not found


plz refer to the following code

following is the session bean which will be the client for the cmp for
creating user.
i catched javax.ejb.EJBException ee but no use.
How should i catch above exception here.

I am working on weblogic 5.1.0


public boolean addUserDetails(UserInfoSl user) throws UserInfoException
        {
                        //UserInfoSessionBean userInfoCli = new
UserInfoSessionBean();
                        //Context ic = userInfoCli.getInitialContext();
                        //UserInfoEntityHome userEntityHome =
getUserEntityHome();
                        try
                        {
                                getUserEntityHome().create(user);
                                return true;
                        }

                        catch(java.rmi.RemoteException re)
                        {
                                throw new EJBException(re);
                        }
                        catch(javax.ejb.EJBException ee)
                        {
                                throw new UserInfoException("Registration
Error: We're sorry, either contact id or aspcusid invalid");
                        }

                        catch(javax.ejb.DuplicateKeyException de)
                        {
                                throw new UserInfoException("Registration
Error: We're sorry, someone has already selected the user name entered");
                        }
                        catch(javax.ejb.CreateException ce)
                        {
                                throw new UserInfoException("Registration
Error: We're sorry, either contact id or aspcusid invalid");
                        }
                        //return false;


        }

                Warm Regards

>               Purushotham Das K
                Planetasia.com
                        A Microland Company

                        email : [EMAIL PROTECTED]
>               Tel : 91 80 508 4659 - 232
>               Fax : 91 80 553 7233
>               URL :  www.planetasia.com
>
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to