Java Oracle DB 表或视图不存在

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21617648/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 09:40:57  来源:igfitidea点击:

Oracle DB table or view does not exist

javasqloracle

提问by Rajith Shanika

I'm trying to connect a Oracle database to my JAVA web project. and when creating the connection to the database using system user connection is successfully established.

我正在尝试将 Oracle 数据库连接到我的 JAVA Web 项目。并在使用系统用户连接创建与数据库的连接时成功建立。

But when I execute a simple select * command in the connection it says

但是当我在连接中执行一个简单的 select * 命令时,它说

Error code 942, SQL state 42000: ORA-00942: table or view does not exist.

错误代码 942,SQL 状态 42000:ORA-00942:表或视图不存在。

These sql queries work in sqldeveloper. No errors.

这些 sql 查询在 sqldeveloper 中工作。没有错误。

I'm using oracle 10g thin client ojdbc6 driver and jdk 1.7

我正在使用 oracle 10g 瘦客户端 ojdbc6 驱动程序和 jdk 1.7

what can be the problem?

可能是什么问题?

Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
Error Code: 942
Call: SELECT USERID, FULLNAME, USERNAME, USER_CREDENTIALSID, USER_TYPEID FROM USERS
Query: ReadAllQuery(referenceClass=Users sql="SELECT USERID, FULLNAME, USERNAME, USER_CREDENTIALSID, USER_TYPEID FROM USERS")

采纳答案by Rajith Shanika

Problem was connecting as the system user. I saw an account in oracle administration page called JPAMAGAZINE. connected using that account and it worked.

问题是作为系统用户连接。我在 oracle 管理页面中看到了一个名为 JPAMAGAZINE 的帐户。使用该帐户连接并且它有效。