• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejbSelect method doubt..plz help

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I get the following error: the details are given below!

Unknown query: public abstract java.util.Collection com.sextanttech.entities.implementations.UserBean.ejbSelectUsers(int,int,int) throws javax.ejb.FinderException


The relevant part of my ejb-jar.xml file
-----------------------------------------------------

<query>
<query-method>
<method-name>ejbSelectUsers</method-name>
<method-params>
<method-param>int</method-param>
<method-param>int</method-param>
<method-param>int</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[
SELECT user.userName
FROM UserTable user
WHERE user.flag1 = ?1
AND user.flag2 = ?2
AND user.flag3 = ?3]]>
</ejb-ql>
</query>


The relevant part of my entity bean class:
-------------------------------------------------------

public Collection getselectedusers() throws FinderException // this is my business method impl.
{

Collection cc = this.ejbSelectUsers(1,1,1);
return cc;
}

public abstract Collection ejbSelectUsers( int flag1,int flag2,int flag3 ) throws FinderException;




Thanks in advance!
alex.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"alexanderpetrous",

We're pleased to have you here with us in the EJB forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks,
Jeanne
Bartender
 
Grow a forest with seedballs and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic