表或视图在休眠中不存在

时间:2018-09-25 13:53:55

标签: java hibernate wicket

启动应用程序时出现错误

ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist

ERROR org.apache.wicket.RequestCycle - Can't instantiate page using constructor public com.bt.capman.web.admin.page.AdminPage()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public com.bt.capman.web.admin.page.AdminPage()
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:168)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:58)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:262)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:283)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:210)
    at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
    at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1175)
    at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
    at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
    at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
    at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
    at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:124)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.bt.capman.web.filter.ContextAuthenticationFilter.doFilter(ContextAuthenticationFilter.java:105)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:149)
    ... 28 more
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.loader.Loader.doList(Loader.java:2148)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1533)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
    at com.bt.capman.dao.network.interconnection.exception.ExceptionDAOHibernate.getdata(ExceptionDAOHibernate.java:40)

我已经检查了ExceptionDAOHibernate.java:40

中的代码
List<ExceptionView> list = crit.list();

和ExceptionView是指可在DB中访问的View。我不确定为什么会收到此错误。

1 个答案:

答案 0 :(得分:2)

此错误表示您正试图从无法访问的表中获取一些数据。检查您是否以正确的用户身份登录或该用户是否具有所有特权。