-->
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.  [ 4 posts ] 
Author Message
 Post subject: Ora-01031 when selecting from a table with priveledge
PostPosted: Thu Aug 02, 2007 3:48 pm 
Newbie

Joined: Thu Aug 02, 2007 1:54 pm
Posts: 3
Hi guys, I'm having serius problems with Hibernate3 and Oracle10g.

When my app is trying to SELECT from some table (ex. mytable), using the correct mapped object, I'm getting a "ORA-01031 Insufficient Privileges", although the current user has all the privileges needed for the app in order to access the superuser schema objects (I mean the owner for those tables). The more rare thing is that I can (using the app user) SELECT from that table without problems when using SQL*PLUS.

Also, I can SELECT from anothers tables in that schema using Hibernate mapping, but something odd is happing whit certain tables.

Can somebody give a hint about this situation?

Thanks in advance,

_________________
Hayrol Reyes


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 2:27 am 
Newbie

Joined: Wed Aug 01, 2007 4:53 pm
Posts: 11
Are these system tables in a system schema? If so, witch tables are you having problems with?

Perhaps you can check you hibernate.cfg.xml to see if the correct user is configured.

Another thing you can try, is to create a synoniem in the schema from where you're working to the system table. That should work i guess


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 03, 2007 9:40 am 
Newbie

Joined: Thu Aug 02, 2007 1:54 pm
Posts: 3
Passero wrote:
Are these system tables in a system schema? If so, witch tables are you having problems with?


The table is owned by the ADM schema (it's the app owner or the superuser)....

Passero wrote:
Perhaps you can check you hibernate.cfg.xml to see if the correct user is configured.


Everything is Ok in hibernate.cfg.xml, and also we have correct access to other tables owned by ADM.

Passero wrote:
Another thing you can try, is to create a synoniem in the schema from where you're working to the system table. That should work i guess


The user "appuser1" has access to the ADM schema objects through synonyms and it has granted all the privileges needed by a ROLE asigned to each user that will access the app.

The rare thing is that we can "select" from that table when using SQL*Plus.

HELP!!!!

_________________
Hayrol Reyes


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 04, 2007 12:13 pm 
Newbie

Joined: Thu Aug 02, 2007 1:54 pm
Posts: 3
Well, for all ppl that have Ora-01031 problems with no reason. We check inside Hibernate configuration in the current application and found that the ppl that made this app used a user and password in "hard code" into the hibernate and web context configurations. In this way the users who login to the application was not making severals access to the rdbms, but the "hard code" user was. this hard code user has not the ROLES needed in this new environment (a Oracle AS and a Oracle1g rdbms, both for development), and that user was generating the "ORA-01031 Insuffient Privileges" couse this user did the connection to the rdbms and not the user who loged in.

Now, we are trying to "remove" this aproach (and of course delete the "hard code" user in the hibernate config) and implement a login proccess where we can use a rdbms authentication and authorization.

Any hints at this moment will be apreciated.

Atte,

_________________
Hayrol Reyes


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.