This content has been marked as final.
Show 4 replies
-
1. Re: javax.ejb.ObjectNotFoundException with CMP. No such enti
aegcp Jul 24, 2002 2:07 AM (in response to aegcp)BTW I'm using jboss-3.0.1RC1
-
2. Re: javax.ejb.ObjectNotFoundException with CMP. No such enti
tdang Jul 24, 2002 3:01 AM (in response to aegcp)I recommend you should use the final version because JBoss RC1 and RC2 have a lot of bugs.
-
3. Re: javax.ejb.ObjectNotFoundException with CMP. No such enti
isakson Jul 24, 2002 11:50 AM (in response to aegcp)try wrapping your findByPrimaryKey in a try/catch (FinderException fe) block. I think the finder is throwing an exception when it can't find the entity.
do something like:
LocalUser myLocalUser;
try {
myLocalUser = home.findByPrimaryKey(query);
}
catch (ObjectNotFoundException onfe) {
// user doesn't exist, so create
myLocalUser = home.create(f.getUserName(), f.getPassword1(),f.getEmail(), address,f.getMobile());
}
Eric -
4. Re: javax.ejb.ObjectNotFoundException with CMP. No such enti
aegcp Jul 24, 2002 8:44 PM (in response to aegcp)it worked.. thank you so much.