Nikhil Kuriakose
Nikhil Kuriakose

Reputation: 1201

exception ORA-00942: table or view does not exist - when inserting into an existing table using hibernate session

Am getting the following error when inserting a BLOB object to an Oracle Database table. It does not happen to all BLOB objects. While inserting a huge number of objects, most of them gets inserted before the error is thrown. So I can guarantee that the table does exist.

We are inserting data by plainly saving the hibernate entity. No Prepared Statements are used. I have found this post regarding the same error while using Prepared Statements. Can anyone please provide a reason and a possible solution for this issue when using plain hibernate entities and session.

java.sql.SQLException: ORA-00942: table or view does not exist
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) 
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573) 
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1889)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940) 
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout>>       (OracleStatement.java:2709)
    at     oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at quotecopy.DbConnection.insertIntoDestinationDb(DbConnection.java:591)
    at quotecopy.QuoteCopier.main(QuoteCopier.java:72) 

Upvotes: 0

Views: 1323

Answers (1)

peter.petrov
peter.petrov

Reputation: 39477

Check if your table name is correct. If it's correct then check if the DB login/user
(which you use to connect to Oracle) has the proper permissions to access this table.

Upvotes: 1

Related Questions