Andre Selton wrote:
> --- Dain Sundstrom <[EMAIL PROTECTED]> wrote:
>
>>> <cmr-field>
>>> <cmr-field-name>order</cmr-field-name>
>>> <cmr-field-type>Order</cmr-field-type>
>>> </cmr-field>
>>>
>>
>>This one it wrong. You only need (can have)
>>cmr-field-type if the
>>cmr-field is multi-valued.
>>
>
> With this I can now deploy my beans on JBoss 3.0.0
> But I can not make the relationships yet.
> To make the relationship I am getting one interface
> for the Order and one for the Item. Like this :
>
> Object ref = jndiContext.lookup("Order");
> OrderHome order_home = (OrderHome)
> PortableRemoteObject.narrow (ref, OrderHome.class);
> Order order = order_home.findByPrimaryKey(new
> OrderPK(new Integer(1)));
>
> ref = jndiContext.lookup("Item");
> ItemHome item_home = (ItemHome)
> PortableRemoteObject.narrow (ref, ItemHome.class);
> Item item = item_home.findByPrimaryKey(new
> ItemPK(new Integer(1)));
>
> This is working.
> Now to create the relationship I can do 2 things
> (one of) : call the order.setItems method or call the
> item.setOrder method. Both fail.
>
> If I use this I got a error on the first line :
>
> Collection c = order.getItems();
> c.add(item);
> order.setItems(c);
>
> The error message (from exception) is :
>
> "java.lang.reflect.UndeclaredThrowableException"
>
> And the other method would be :
>
> item.setOrder(order);
>
> The error message (from exception) on this case is :
>
> java.rmi.ServerException: RemoteException occurred in
> server thread; nested exception is:
> java.rmi.ServerException: null
> Embedded Exception
> $Proxy103; nested exception is:
> javax.ejb.EJBException: null
> Embedded Exception
> $Proxy103
>
> Please, what is the problem now ?
Got me. Both of these work for me. We have a test that runs every
night that looks just like this.
-dain
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user