ORA-00942:表或视图不存在 - oracle 11g异常

时间:2017-10-08 19:46:32

标签: java oracle oracle11g

我正在尝试与eclipse进行oracle 11g连接,我的程序列出了表的内容,  我为此写的代码是

try { 
String connection ="jdbc:oracle:thin:@localhost:1521:xe";
String user ="testuser";
String password = "12345";

Class.forName("oracle.jdbc.driver.OracleDriver");           
Connection con = DriverManager.getConnection(connection,user,password);             stmt = con.createStatement();           
rs=stmt.executeQuery("Select * from DETAILS");      
} catch (Exception e) {             
            e.printStackTrace();        
}

但是当我执行此操作时,我得到的表不存在异常,我确信我已经在架构'XE'下创建了表,但我不确定是什么问题。

这是我的堆栈跟踪

java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:852)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1477)
    at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:392)
    at JDBC.main(JDBC.java:20)

0 个答案:

没有答案