-----Original Message-----
From: Paul D Austin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 10:37 AM
To: Noorzaie, Jamal
Subject: RE: CMP ejb findByPrimaryKey() and create() problemsJamal,
In the jaws.xml file below the <jaws> tag you should have lines like the following. This is so that it knows which datasource to use and which database mapping to use. http://www.jboss.org/documentation/HTML/ch05s02.html
<datasource>OraclePool</datasource>
<type-mapping>Oracle</type-mapping>I presume in you jboss.jcml file you have added an entry for the OraclePool datasource http://www.jboss.org/documentation/HTML/ch03s05.html.
I also presume that if you look in your table that there is a row with a primary key value of "1" as ObjectNotFoundException is thrown when it cannot find the data in the database.
hope this helps,
Paul-----Original Message-----
From: Noorzaie, Jamal [mailto:[EMAIL PROTECTED]]
Sent: 07 June 2001 15:48
To: Paul D Austin
Subject: CMP ejb findByPrimaryKey() and create() problems
Paul:
I was wondering if you can guide me on this one:
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
storageat
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 am not 100 percent sure about the inclusion and use of jaws.xml file. It
does not seem to make any difference if it there or not. I would very much
appreciate your help in advance. I think I am not structuring my descriptor
files correctly.Regards,
Jamal.
Title: RE: CMP ejb findByPrimaryKey() and create() problems
Paul:
Thanks
a million. This was exactly the problem. Everything is working now.
My
best regards,
Jamal.
