日期:2014-05-17  浏览次数:20820 次

hibernate 连接oracle错误
我连接本机,和11库都没问题,连接12库就报错,这到底是什么问题啊,网上查了下好多人都说是hql语句问题,可是其他库又没问题呀。。。。用jdbc连接也没问题。。我本机,11 和12库表都是一样的

Java code

严重: Servlet.service() for servlet default threw exception
java.lang.IllegalStateException
    at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)
    at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:752)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:505)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)


界面
Java code

Struts Problem Report

Struts has detected an unhandled exception:
Messages:     

   1. ORA-00942: ???????
   2.
      FreeMarker template error!



      Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.SQLGrammarException: could not execute query
      The problematic instruction:
      ----------
      ==> ${msg[0]} [on line 68, column 29 in org/apache/struts2/dispatcher/error.ftl]
      ----------

      Java backtrace for programmers:
      ----------
      freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on org.hibernate.exception.SQLGrammarException: could not execute query
          at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
          at freemarker.ext.beans.SimpleMethodModel.get(SimpleMethodModel.java:138)
          at freemarker.core.DynamicKeyName.dealWithNumericalKey(DynamicKeyName.java:111)
          at freem