File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes ORA-00942 How to figure out privileges problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ORA-00942 How to figure out privileges problem" Watch "ORA-00942 How to figure out privileges problem" New topic
Author

ORA-00942 How to figure out privileges problem

D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I have a stored procedure which's called fine from SQL+, however gives above exception if called from Java code. How to figure out security constrains defined for a stored procedure? It's Oracle + JDBC question. Oracle version is 9.


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
Since you are getting ORA exception we can't term this has JDBC issue. Are you using the same login info for both SQL* and JDBC? If so, it's kind of strange unless in SQL* you are wrapping the exceptions while calling stored procedure. There isn't much to tell but you have to take a look at the procedure and objects used and debug.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

probably you should look for the details of error code, which you got from oracle


ORA-00942 table or view does not exist

(Oracle version: 9i )


Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.

Action: Check each of the following:
  • The spelling of the table or view name.
  • That a view is not specified where a table is required.
  • That an existing table or view name exists.


  • Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted

    Shailesh


    Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: ORA-00942 How to figure out privileges problem
     
    Similar Threads
    Call java method when a trigger is triggered from oracle8i
    Oracle Java Stored Procedure ... Urgent help needed.
    Using JDBC for a remote call in Oracle
    calling stored procedure in oracle which returns a table
    Oracle Store Procedures