This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes ORA-00942: table or view does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "ORA-00942: table or view does not exist" Watch "ORA-00942: table or view does not exist" New topic
Author

ORA-00942: table or view does not exist

Aruna Ponaka
Greenhorn

Joined: Dec 08, 2009
Posts: 8
i have enabled "show_sql" to true and can see the following hibernate query

Hibernate: insert into defaultschema.rca_param (param_val_t, param_remk_t, defunct_f, param_t) values (?, ?, ?, ?)

but i get the SEVERE: ORA-00942: table or view does not exist.

The database has the rca_param table and the columns.

When i run the same sql removing the defaultschema from the query, i.e.

insert into rca_param (param_val_t, param_remk_t, defunct_f, param_t) values ('T','T',"Y','Y');

the query executes in TOAD, but when i run the code, i get the table or view not found exception.

Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1112

Aruna,
I am aware of only two causes for the Oracle error code ORA-00942
  • The table (or view) really doesn't exist
  • The database user does not have permission to access (or modify) the table

  • Since you claim to be able to modify the table via TOAD but not via Hibernate, my guess is that you are using different database users in TOAD and Hibernate.
    Also, when accessing a table in Oracle, you only really need to prefix the table name with its schema name if you are accessing it from a different schema.

    Hope this helps you.

    Good Luck,
    Avi.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: ORA-00942: table or view does not exist
     
    Similar Threads
    no. of connection
    java.sql.SQLException: ORA-00942
    weird executeUpdate error?
    Exception when having different class and table name
    javax.servlet.ServletException:[Oracle][ODBC] [Ora]ORA-00942: table or view does not exist