views:

62

answers:

1

Hi, we have a Java program connecting via JDBC thin client to an Oracle 10g database.

Everything was working fine, but now the DBA wants us to connect with a different username/password, which is supposed to have access to the same tables using public synonyms. Unfortunately the Java program no longer sees the tables (see error below when I try to do "select * from tablename").

I have tried to connect using the same username/password with Oracle SQL Developer and in this case I can run "select * from tablename" without problems.

Is there a specific Parameter I need to put in the connect string?

Many thanks!

Exception in thread "main" java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1687)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1653)

Edited by: user555817 on 08-Oct-2010 04:55
A: 

1.It seems user doesn't have access to that table. confirm this.

2.Make sure you have changed[used proper] database name in connection string.

org.life.java
1. That's not the case because the same user/password can access the table via Oracle SQL Developer
javaExpert
2. The database name in the connection string hasn't changed
javaExpert