javax.ejb.ObjectNotFoundException is thrown when the object you search doesn't  exist 
in your table.
It's a "normal" exception.
You must call the create method before findByPrimaryKey, because if your object 
doesn't exist,
you can't find it :)


Cecile Saint-Martin
[EMAIL PROTECTED]
----- Original Message ----- 
From: "Noorzaie, Jamal" <[EMAIL PROTECTED]>
To: "'jboss'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 11:53 PM
Subject: [JBoss-user] Problem with CMP EJB.


> Hi Group:
> 
> I am using JBoss-2.2.2_Tomcat-3.2.2 just downloaded today. Here is my
> problem:
> 
> (I am running on window NT 4.0, jdk1.3, jdbc thin drivers classes12.zip from
> Oracle)
> 
> I have constructed a simple CMP EJB called JDBCTEST. It represents a table
> in an Oracle 8i with the same name. My table has two columns: ID, NAME .
> The type for both columns is VARCHAR. The bean deploys without any problems,
> but when I try to use the findByPrimaryKey() or create methods from a client
> class this is the error I am getting:
> 
> Got context
> 
> Got reference
> 
> javax.ejb.ObjectNotFoundException: Object with primary key 1 not found in
> storage
> 
> at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
> all.java:245)
> 
> at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
> 
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> 
> at
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno
> wn Source)
> 
> at
> org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:248)
> 
> at $Proxy0.findByPrimaryKey(Unknown Source)
> 
> at com.acs.ejb.JDBCTESTBeanClient.<init>(JDBCTESTBeanClient.java:44)
> 
> at com.acs.ejb.JDBCTESTBeanClient.main(JDBCTESTBeanClient.java:56)
> 
> 
> Here is my client class:
> 
>  <<JDBCTESTBeanClient.java>> 
> 
> 
> Here are is the EJB jar:
> 
>  <<JDBCTEST.jar>> 
> 
> I would very much appreciate your help in advance. I think I am not
> structuring my descriptor files correctly.
> 
> Regards,
> Jamal.
> 
> 
> 


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

Reply via email to