java.sql.SQLSyntaxErrorException:ORA-00942:表或视图不存在:jdbcTemplate

时间:2019-01-31 13:09:45

标签: java spring oracle weblogic jdbctemplate

我们正在使用jdbc模板与我们项目中的oracle数据库进行通信,并且在部署后它会引发以下异常。

  

org.springframework.jdbc.BadSqlGrammarException:   PreparedStatementCallback;错误的SQL语法[从用户中选择count(*)   其中temp_id =?];嵌套异常为   java.sql.SQLSyntaxErrorException:ORA-00942:表或视图不   存在

用户已存在于表中,但仍会引发RA-00942:表或视图不存在。

以下是Java代码

  

this.jdbcTemplate.queryForObject(“从以下项中选择count(*)   用户,其中temp_id =?”,新的Object [] {userKey},Integer.class);

其中userKey是在方法中作为参数传递的字符串

此异常背后的可能原因是什么?

编辑:更新查询后

  

this.jdbcTemplate.queryForObject(“从以下项中选择count(*)   dbuser.users,其中temp_id =?”,新的Object [] {userKey},Integer.class);

仍然存在同样的问题

0 个答案:

没有答案
相关问题