opnjpa with createnamedquery

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

opnjpa with createnamedquery

kamals
I am using openjpa and WAS7. I am trying to use NamedQuery on it. It is not able to fetch result . I am getting below error

entity manager is not opened.-Query "SELECT S FROM Survey S WHERE S.id=:id" selected no result, but expected unique result.

I have check everything I have included all dependencies on pom.

While using em.find(Survey.class,) fetch me results.