findByPrimaryKey must return a single bean, not a
collection.  Check your home interface and bean implementation.  The home
interface should have a return type of the remote interface, and the bean
implementation should have a return type of the primary key class (here
String).

Aaron

On Mon, 18 Sep 2000, Davide Mora wrote:
> Hi,
> 
> i'm writing a test entity bean, everything is okay
> except the findByPrimaryKey(), i get a:
> 
> java.lang.ClassCastException: java.util.ArrayList     at
> $Proxy0.findByPrimaryKey(Unknown Source)      at
> com.etasistemi.rg.client.Client.main(Client.java:24) 
> 
> at client-side.
> My primary keys it's a java.lang.String, and my xml
> is:
> 
> <entity>
> <display-name>SGR</display-name>
> <ejb-name>SGR</ejb-name>
> <home>com.etasistemi.rg.SGRHome</home>
> <remote>com.etasistemi.rg.SGR</remote>
> <ejb-class>com.etasistemi.rg.impl.SGRImpl</ejb-class>
> <persistence-type>Container</persistence-type>
> <prim-key-class>java.lang.String</prim-key-class>
> <primkey-field>Nome</primkey-field>
> <reentrant>false</reentrant>
> <cmp-field><field-name>Nome</field-name></cmp-field>
> <cmp-field><field-name>Descrizione</field-name></cmp-field>
> </entity>
> 
> Any idea?
> 
> Davide



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to