• 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

Unknow query

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

I am a novice in EJB. I am using EJB-QL to retrieve records from the database.

eg.
* @ejb.finder signature="java.util.Collection findAccByParentId(
* java.lang.String PId)"
* query="SELECT OBJECT(acc)
* FROM Account As acc
* WHERE acc.AccParentId = ?1"

But it produces this exception.
Exception in thread "main" javax.ejb.FinderException : Unknow query

What could be the problem here?

Please advise. Thank you.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's been a while since I've done XDoclet stuff, but I'm thinking those asterisks in the middle of your quoted query string aren't good. Try removing them since they might be screwing up XDoclet. You might want to check out what XDoclet is actually generating and see if your query is making it into the deployment descriptor.
 
reply
    Bookmark Topic Watch Topic
  • New Topic