本人用SSM框架写的后台服务,在调用服务时出现以下错误,请问这个该怎么解决?
备注:表和视图在数据库中是存在的,将sql语句放入qlsql也能查出数据。
Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在
### The error may exist in file [/home/scgw/ev/EV-Server_Redhat_6.4_X64_6.0.9/EV-WebServer/tomcat-7.0.52/webapps/EVGlobeServer_SSM/WEB-INF/classes/com/evglobe/mapper/TowerDevice.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select t.linkedpole,min(t.ssdsmc) ssdsmc,min(t.ywdwmc) ywdwmc,min(t.dydj) dydj,min(t.linkedlinename) linkedlinename, min(t.linkedpolename) linkedpolename,min(t.devicecode) devicecode,min(t.devicename) devicename,min(t.releasedate) releasedate, min(t.rundate) rundate,min(t.isactivated) isactivated,min(t2.evlongitude) lon,min(t2.evlatitude) lat from t_zxjc_cmst_linedevice t, EV_REF_LINENODE_PHYSIC t1,EV_TOWERPHYSICINFOR t2 where t.linkedpole=t1.evrunno and t1.evphysicid=t2.evid group by t.linkedpole
### Cause: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在
参考:http://www.cnblogs.com/jtmjx/archive/2012/07/03/2574766.html
和http://blog.csdn.net/chaplinlong/article/details/51922655
参考了一下,但是还能没能解决,还是会出现上述错误,但是有时候有json数据返回,有时间出现上述错误,感觉很奇怪!
谢谢了,参考了一下你给的网址,应该已经解决了!应该是由于数据库用户的权限问题造成的