Hi,
I think ObjectNotFoundEx is a subclass of FinderException? shouldn't this be
caught by catch(FinderException)?
Isn't the output from
>        } catch (javax.ejb.FinderException fe) { fe.printStackTrace();
>                        return available; }
???
Burkhard
>----- Original Message -----
From: "Saint-Martin Cecile" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 9:21 AM
Subject: RE: [JBoss-user] Object not found in storage


Are you sure your CMP is mapped with the right table?
Are you sure your table is not empty?
(You should test your result of findByPrimarykey before using it...)

SAINT-MARTIN Cecile
[EMAIL PROTECTED]

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Carlos
> Ferrão
> Envoyé : vendredi 20 juillet 2001 01:50
> À : jboss ml
> Objet : [JBoss-user] Object not found in storage
>
>
>
> Hi all,
>
> I'm getting the following error:
>
> [acc_library] javax.ejb.ObjectNotFoundException: Object with primary key
> accessprj.Cpublicationpk@3 not found in storage
> [acc_library]   at
> org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.findByP
> rimaryKey(JDBCFindEntityCommand.java:88)
> [acc_library]   at
> org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntityCommand.execute
> (JDBCFindEntityCommand.java:59)
> [acc_library]   at
> org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.findEntity(
> JAWSPersistenceManager.java:130)
> [acc_library]   at
> org.jboss.ejb.plugins.CMPPersistenceManager.findEntity(CMPPersiste
> nceManager
> .java:270)
> [acc_library]   at
> org.jboss.ejb.EntityContainer.find(EntityContainer.java:419)
> [acc_library]   at java.lang.reflect.Method.invoke(Native Method)
>
> ....
>
> [acc_library]   at $Proxy24.findByPrimaryKey(Unknown Source)
> [acc_library]   at
> accessprj.acc_libraryBean.isPubAvailable(acc_libraryBean.java:644)
>
> I'm trying to access a field through an entity bean.
>
> try {
>         Context jndiContext = new InitialContext();
>         Object publication_ref = jndiContext.lookup("publication");
>         publicationHome publicationhome = (publicationHome)
> javax.rmi.PortableRemoteObject.narrow(publication_ref,publicationH
> ome.class)
> ;
>         pubpk.pub_id=pub_id;
>         try {
>           pub = publicationhome.findByPrimaryKey(pubpk);
>           quantity= pub.getQuantity();
>         } catch (javax.ejb.FinderException fe) { fe.printStackTrace();
> return available; }
>
>       }
>       catch (NamingException ne) {ne.printStackTrace();}
>       catch (RemoteException re) {re.printStackTrace();}
>
> my primary key class is as follows:
>
> public class Cpublicationpk implements Serializable {
>   public int pub_id;
>
>   public int hashCode() {
>     return pub_id;
>   }
>
>   public boolean equals(Object obj) {
>     if (obj instanceof Cpublicationpk) {
>       return (pub_id == ((Cpublicationpk)obj).pub_id);
>     }
>     return false;
>   }
> }
>
> This happens with every row. What is wrong?? is something missing
> in JAWS??
> With Inprise AppServer this code works fine.
>
> Best Regards,
> Carlos Ferrao
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to