I have a strange problem: Suppose that I have two classes, A and B. Suppose that I have a ManyToOne from A to B, bidirectional. If I try to invoke A.getB(), I get a NoSuchMethodError. So, I tried to check the methods of my class and results that getB() returns java.lang.String, and NOT B. So, using ejbQL, I can read this field, but as string ("select a.B from A a" -> List<String> .
The strange thing is that the A.getClass() method gives the correct class name and B.getAs() returns correctly a List<A>.
I get a similar problem when I create a many-to-many unidirectional from A to B: in this case, no such List<B> getB() method results in A, so that I get a NoSuchMethodError, as above.