-->
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.  [ 1 post ] 
Author Message
 Post subject: Using Hibernate with an updatable view and Oracle
PostPosted: Wed Aug 03, 2011 4:14 am 
Newbie

Joined: Wed Aug 03, 2011 3:50 am
Posts: 1
I've been browsing the forums to see if anyone has come up with this problem but I don't think anyone has documented the exact issue that I am having.

I am trying to use Hibernate with a view in Oracle. The view has update triggers defined in order to make it an updateable view so that it effectively acts as a table.

The problem is that when my application starts I get the following error:

Code:
util.JDBCExceptionReporter ORA-01702: a view is not appropriate here
hbm2ddl.SchemaUpdate could not complete schema update
org.hibernate.exception.SQLGrammarException: could not get table metadata: CDS_CLIENT_ATTR_HIBERNATE

The common cause for receiving an error like this is because the database user does not have the ANALYZE ANY privilege granted. The user that I am connecting as does have ANALYZE ANY privillages.

My guess is that the reason this is occuring is that Hibernate would be running a command on Oracle like:

Code:
ANALYZE TABLE CDS_CLIENT_ATTR_HIBERNATE VALIDATE STRUCTURE CASCADE

...and Oracle would then be returning the ORA-01702 error because the object it is trying to analyze is a view which is not supported by the ANALYZE TABLE command.

Is there any way that I can fix this error so it doesn't occur.

Thanks in advance,
James


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

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.