• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unknow query

 
Chris Lim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!