Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finder that returns Collection complains about more than one row

16 views
Skip to first unread message

Saad Rehmani

unread,
Feb 18, 2002, 10:58:27 AM2/18/02
to
Hi all,

I have a finder method in my local home with this signature:

public java.util.Collection findByManufacturer (String manufacturer) throws
FinderException;

and am getting this error:

javax.ejb.FinderException: finder/ejbSelect 'findByManufacturer'has returned
more than one value. We were expecting only ONE value. See EJB Spec
10.5.6.1, 10.5.7.1


from what i understand, shouldn't the finder allow multiple rows to be
returned? i looked up the EJB spec and that portion seems to address
single-object finders.

system info is as follows:

java weblogic.Admin VERSION
WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
WebLogic XML Module 6.1 SP2 12/18/2001 11:28:02 #154529

thanks,

-saad

Rajesh Mirchandani

unread,
Feb 19, 2002, 12:06:27 PM2/19/02
to
This should work. Did you recompile your beans when you upgraded to SP2?

Saad Rehmani wrote:

--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support


Saad Rehmani

unread,
Feb 19, 2002, 10:55:30 PM2/19/02
to
yes, just to verify i just did a complete re-assembly ( compile beans ; jar
; weblogic.ejbc ; move to domain\config\applications\application ) and am
still getting the same error as before.

furthermore, i dont know about wl internals at all, but it seems that the
container does recognize that this is a collection since the stacktrace
reveals a call to
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder() ...

the stack trace in question is pasted below. thanks for any help.

-saad


<Feb 19, 2002 9:49:14 PM CST> <Error> <HTTP>
<[WebAppServletContext(595826,catal
og,/catalog)] Root cause of ServletException


javax.ejb.FinderException: finder/ejbSelect 'findByManufacturer'has returned
mor
e than one value. We were expecting only ONE value. See EJB Spec 10.5.6.1,
10.
5.7.1

at
com.metavonni.platinum.catalog.item.PhoneBean_g458gu__WebLogic_CMP_RD
BMS.ejbFindByManufacturer(PhoneBean_g458gu__WebLogic_CMP_RDBMS.java:1297)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDB
MSPersistenceManager.java:274)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityM
anager.java:669)
at
weblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityM
anager.java:642)
at
weblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.
java:381)
at
com.metavonni.platinum.catalog.item.PhoneBean_g458gu_LocalHomeImpl.fi
ndByManufacturer(PhoneBean_g458gu_LocalHomeImpl.java:184)
at jsp_servlet.__x._jspService(__x.java:102)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)

"Rajesh Mirchandani" <Re...@ToNewsgroup.Only> wrote in message
news:3C728612...@ToNewsgroup.Only...

0 new messages