首页 > Bug

cn.kuwo.exceptions.KoowoHibernateException

发表于2015-05-05 15:12:40| --次阅读| 来源webkfa| 作者小周

摘要:net.sf.hibernate.exception.SQLGrammarException

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: cn.kuwo.exceptions.KoowoHibernateException: query by: from EditIndexSale error:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

javax.servlet.ServletException: cn.kuwo.exceptions.KoowoHibernateException: query by: from EditIndexSale error:
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
	org.apache.jsp.edit2014.editsale_jsp._jspService(editsale_jsp.java:1338)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

cn.kuwo.exceptions.KoowoHibernateException: query by: from EditIndexSale error:
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:191)
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:127)
	cn.kuwo.hibernate.services.EditService.getCommQueryMethod(EditService.java:2028)
	org.apache.jsp.edit2014.editsale_jsp._jspService(editsale_jsp.java:504)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

net.sf.hibernate.exception.SQLGrammarException: Could not execute query
	net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:69)
	net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
	net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131)
	net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1557)
	net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:185)
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:127)
	cn.kuwo.hibernate.services.EditService.getCommQueryMethod(EditService.java:2028)
	org.apache.jsp.edit2014.editsale_jsp._jspService(editsale_jsp.java:504)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'EDITOR.EditIndexSale' doesn't exist
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
	com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
	com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
	com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
	com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
	com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
	org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
	net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
	net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
	net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
	net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
	net.sf.hibernate.loader.Loader.list(Loader.java:1054)
	net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
	net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
	net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:185)
	cn.kuwo.hibernate.HibernateService.query(HibernateService.java:127)
	cn.kuwo.hibernate.services.EditService.getCommQueryMethod(EditService.java:2028)
	org.apache.jsp.edit2014.editsale_jsp._jspService(editsale_jsp.java:504)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.


Apache Tomcat/6.0.29

解决办法:

主要看到错误的这行

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'EDITOR.EditIndexSale' doesn't exist
EDITOR数据库没有EditIndexSale表,所以检查EditIndexSale.xml文件里面表名是不是写错
也就是检查table="EDIT_INDEX_SALE" 
xml代码
<hibernate-mapping>
    <class name="cn.bean.EditIndexSale" table="EDIT_INDEX_SALE">
        <id name="id" type="java.lang.Integer">
            <column name="ID" />
            <generator class="native"></generator>
        </id>
    </class>
<hibernate-mapping>

相关文章

猜你喜欢

学到老在线代码浏览器 关闭浏览
友情链接: hao123 360导航 搜狗网址导航 114啦网址导航 博客大全
Copyright © 1999-2014, WEBKFA.COM, All Rights Reserved  京ICP备14034497号-1