ORA-01031: 权限不足
Org.springframework.jdbc.BadSqlGrammarException: Hibernate-related JDBC operation; bad SQL grammar [];
nested exception is java.sql.SQLException: ORA-01031: 权限不足
ORA-06512: 在 "SYS.DBMS_SESSION", line 90
ORA-06512: 在 "YLFWJK.PKG_CONTEXT", line 52
ORA-06512: 在 line 1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:442)
at com.lbs.brick.ylfw.persistence.HibernateTemplateYLFW.doExecute(HibernateTemplateYLFW.java:93)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
解决方法:
删掉context_ylfwjk (drop context context_ylfwjk) ,然后重新创建该上下文对象:create context context_ylfwjk using pkg_context ACCESSED GLOBALLY;