I believe find the problem.
I have splitted both the EJB and the testcases in the directories src/main/java and src/test/java.
When I put all the files in the same root directory(eg. src/test/java) everything works fine....
How may I workaround ?
the only workaround I have founded is to put all the build files in ONE director (eg. target/classes) and not target/classes for EJB and target/test-classes for test configurations (embedded-ejb,.class, configurations)
finally I have 2 questions:
Why BookingTest works and notBookingUnitTest ?
Is there a way to say to the PersistenceManager to look at in another directory (eg. target/classes)?
Thanks in advance
I found that in my case my code was working fine with following versions of hibernate:
When I added acegi:
I started seeing the problem. Apparenetly acegi uses an older version of hibernate which has this problem.
The workaround was to use a fully qualified class name in the query (thanks to Aleksei Valikov for suggesting that).
Note that the bugon this issue:
was closed with no comment which does not help folks running into the problem. Thanks.