一、问题现象
在程序执行时,突然抛出如下异常“ORA-00980: synonym translation is no longer valid”
15:24:40,477 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper,147 - ORA-00980: synonym translation is no longer valid@b@@b@org.hibernate.exception.SQLGrammarException: could not extract ResultSet@b@ at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)@b@ at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)@b@ at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)@b@ at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)@b@ at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:61)@b@ at org.hibernate.loader.Loader.getResultSet(Loader.java:2040)@b@ at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1837)@b@ at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1816)@b@ at org.hibernate.loader.Loader.doQuery(Loader.java:900)@b@ at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:342)@b@ at org.hibernate.loader.Loader.doList(Loader.java:2526)@b@ at org.hibernate.loader.Loader.doList(Loader.java:2512)@b@ at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2342)@b@ at org.hibernate.loader.Loader.list(Loader.java:2337)@b@ at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495)@b@ at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:356)@b@ at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)@b@ at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269)@b@ at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
二、解决方法
查找对应oracle数据库同义词,将失效的同义词重新更新