Hi,
I am trying out a simple OR mapping example. I have a customer and an 
Account EJB.

In the Customer EJB I declare the the following

public Set accounts;
public static final Class accounts_type=Account.class;


In my client program I try to add a few accounts to the customer and then 
try to retrieve them using the following code

Customer cust2 = findbyPrimaryKey(some primary key value)
System.out.println("Now getting children");
Set s = cust2.getAccounts();
System.out.println("Number of elements from Set = "+ s.size());
Iterator it = s.iterator();
int i = 1;
   while (it.hasNext())
   {
       System.out.println(" i = " + i);
       Account a = (Account)it.next();
      System.out.println("Account number i = " + i + " " + a.getFirstName() 
+ " " + a.getLastName() + " " + a.getBalance());
       i++;
   }

When I run the client I get the following error


Now getting children
Number of elements from Set = 2
i = 1
com.evermind.server.rmi.OrionRemoteException: Disconnected: Unknown command: 
1919511393
        at com.evermind.server.rmi.bb.invokeMethod(JAX, Compiled Code)
        at com.evermind.server.rmi.a2.invoke(JAX)
        at __Proxy3.getFirstName(Unknown Source)
        at Client.main(Client.java, Compiled Code)


Any idea why this is happening. Where am I making the mistake.

Any help is greatly appreciated.


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Reply via email to