It's not a secret anymore!*
The moose likes Object Relational Mapping and the fly likes entityManager and systems tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "entityManager and systems tables" Watch "entityManager and systems tables" New topic
Author

entityManager and systems tables

Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
I need to query some of the system tables of an oracle database from my application but when I try to execute a nativequery I keep getting a null pointer exception.

I even tried the simplest of queries such as

select count(*) from dba_users;

I am guessing this might have something to do with the rights that the entitymanager has but I don't know.

How could I query on system tables using entityManager?

Thanks
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
Please include the stack trace.

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
Pat Peg
Ranch Hand

Joined: Feb 04, 2005
Posts: 194
I found the problem, the user that the entityManager was logged in as lacked permissions to even see the table. Of course, now there is a new issue but I will post a separate topic.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: entityManager and systems tables
 
Similar Threads
Passing EntityManager reference between methods doesn't work as expected
Populating JPA managed Entity from non-JPA managed entity
Illegal to call this method from injected, managed EntityManager
Should I have Entity Manager in the Sequence diagram
time of Query Execution in Oracle ?