Title: SV: Primarkey is 0
I know how EJB works. I know that it's Remote objects. I did call getId but it always returned 0. I solved the problem.
-Ursprungligt meddelande-
Fran: Mangesh Laad [mailto:[EMAIL PROTECTED]]
Skickat: den 17 mars 2001 20:43
Till: Orion-Interest
Amn
Title: SV: SV: Primarkey is 0
I have fixed the problem. THe problem was another field in the table that allowed null that orion did not intend to have contain null values. I had entered data into the database directly and not using the create methods.
-Ursprungligt meddelande-
Fran
Hi
I feel u shud try using java.lang.Long instead of
long.the NullPointerException is thrown since the
ejb container is not able to get any rows from the
database for the primary key u specified
make the change in datatype and try out
--- Patrik Andersson <[EMAIL PROTECTED]>
wrote:
> I
Hi Patrick
Just go thru the addressbook example provided in
the Orion CMP Primer within the documentation link on
www.orionserver.com site..what u get from
coolection is RMI objects that have to be collected in
an array and when u iterate thru the array u pick out
each rmi object and invoke
Title: Primarkey is 0
I found yet another thing. When orion
created tables for two entities in my system. Category has-many Questions. Orion
added a column to the Category table called questions. That is also the CMP
field of type java.util.Collection that holds referenses to the questions
Title: Primarkey is 0
I did
further tests. When I do findByPrimarykey on CategoryHome with one of the id:s
that exist in the database. Get get nothing at all. It throws a RemoteException
with a nested NPE.
com.evermind.server.rmi.OrionRemoteException: Error in ejbLoad
Title: Primarkey is 0
I have a CMP entitybean named Category. It has a name and an id CMP field. I have added a finder method called findAll(),which orion very nicely added a tag in orion-ejb-jar.xml for me, that returns a java.util.Collection object. When I iterate that collection I get the