Originally posted by Reza Rahman:
Salah,
Are you using EJB 3 remoting by accident or on purpose? The problem you are having indicates an RMI connectivity issue, possibly because of a firewall, but it could also be some kind of weird network misconfiguration.
The "from" syntax definitely won't work unless you are using Hibernate. Even then, it's not a good idea...I am shocked the Bill Burke book would include such code. I certainly did not catch that when I read it myself.
The code you have posted is fine otherwise. The problem is elsewhere.
Thanks,
Reza
P.S.: What you are using is called JPQL, not "EJB query language". That refers to EJBQL in EJB 2.x Entity Beans.
[ October 31, 2008: Message edited by: Reza Rahman ]
First of all, thank you much for the reply.
Second, it was in fact in the oreilly book in many sections:
- 9.1. Query API:
- 25.1.6. FlushModeType Behavior
- I saw it also elsewhere in the book
but it is as you said not a valid syntax for JPQL (thank you for the explanation) and because it was a bit strange to me, i looked in the unconfirmed errata of this book. And in fact it was inside as a mistake. (because of this mistake so much trouble and testings but anyway, i am learning
). The unconfirmed errata text contains the right answer:
I tested this syntax and it worked fine. Thank you all for your help.
[ October 31, 2008: Message edited by: Salah Lejmi ]