-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: JPA/View Problem
PostPosted: Tue May 12, 2009 5:36 pm 
Newbie

Joined: Tue May 12, 2009 5:26 pm
Posts: 2
Hi all,

I've searched the forum and it looks as if JPA does support views, which is what I am trying to do -- but having a problem. In my case, the view is owned by another schema. When I connect to the Oracle 10 schema using a tool like Toad, I can't see the view even though I can query it. I tried the query select * from user_views which produced no result. When I try to configure JPA (backed by Hibernate) I get the error:

Code:
Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: XXXX] Unable to build EntityManagerFactory
...
[junit] Caused by: org.hibernate.HibernateException: Missing table: VIEW_TABLE


I asked my DBA about this, but the answer I get is:

Quote:
The system view user_views only shows views that the user owns. The view is owned by another schema. It is in all_tab_privs. If you can run ' select * from VIEW_TABLE', I don't know how it can be a permission issue.

How can I get past this problem?

Stack is Spring 2.5, JPA backed by Hibernate 3.2.6 connecting to Oracle 10 on the back end.

Any reply would be appreciated!


Top
 Profile  
 
 Post subject: Re: JPA/View Problem
PostPosted: Wed May 13, 2009 11:12 am 
Newbie

Joined: Fri Mar 21, 2008 11:35 am
Posts: 10
Since you mention JPA, what is the SCHEMA that you're defining in your @Table on this entity?


Top
 Profile  
 
 Post subject: Re: JPA/View Problem
PostPosted: Wed May 13, 2009 11:53 am 
Newbie

Joined: Tue May 12, 2009 5:26 pm
Posts: 2
genomeprjct wrote:
Since you mention JPA, what is the SCHEMA that you're defining in your @Table on this entity?


The class is annotated as such:
@Table(name = "ORACLE_USER_ID", schema = "ORACLE_USER_ID")

Where the ORACLE_USER_ID is the oracle account used to connect to the schema.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.