开发者社区> 问答> 正文

mysql数据库导入,没有数据,缓存报错?报错

@红薯 你好,想跟你请教个问题:

严重: DLOG_VelocityServlet: 127.0.0.1 => ERROR:Unknown Velocity Error,url=http://localhost:8080/(Mon Nov 16 14:36:06 CST 2015)
org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(Unknown Source)
    at org.hibernate.exception.JDBCExceptionHelper.convert(Unknown Source)
    at org.hibernate.loader.Loader.doList(Unknown Source)
    at org.hibernate.loader.Loader.listUsingQueryCache(Unknown Source)
    at org.hibernate.loader.Loader.list(Unknown Source)
    at org.hibernate.loader.hql.QueryLoader.list(Unknown Source)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(Unknown Source)
    at org.hibernate.engine.query.HQLQueryPlan.performList(Unknown Source)
    at org.hibernate.impl.SessionImpl.list(Unknown Source)
    at org.hibernate.impl.QueryImpl.list(Unknown Source)
    at com.liusoft.dlog4j.dao.DAO.executeNamedQueryCacheable(DAO.java:455)
    at com.liusoft.dlog4j.dao.SiteDAO.listNewestSites(SiteDAO.java:165)
    at com.liusoft.dlog4j.velocity.DLOG_Home_VelocityTool.list_newest_sites(DLOG_Home_VelocityTool.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
    at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
    at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
    at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:419)
    at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
    at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.directive.Parse.render(Parse.java:224)
    at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
    at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
    at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
    at org.apache.velocity.Template.merge(Template.java:254)
    at org.apache.velocity.tools.view.servlet.VelocityLayoutServlet.mergeTemplate(VelocityLayoutServlet.java:224)
    at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:551)
    at com.liusoft.dlog4j.servlet.DLOG_VelocityServlet.doRequest(DLOG_VelocityServlet.java:107)
    at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.liusoft.dlog4j.servlet.DLOG_HomeFilter.doFilter(DLOG_HomeFilter.java:121)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.liusoft.dlog4j.servlet.DLOG_HibernateFilter.doFilter(DLOG_HibernateFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'sitebean0_.friend_status' in 'field list'
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(Unknown Source)
    at org.hibernate.loader.Loader.getResultSet(Unknown Source)
    at org.hibernate.loader.Loader.doQuery(Unknown Source)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Unknown Source)
    ... 72 more


展开
收起
爱吃鱼的程序员 2020-06-10 11:02:06 650 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你拿到的数据好像有问题,给dlog_site表增加一个  friend_status字段,类型是tinyint

    Java的异常,要特别关注Causedby:部分的提示信息。
    2020-06-10 11:02:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
基于英特尔 SSD 的虚拟机缓存解决SSD 立即下载
用户态高速块缓存方案 立即下载
高性能Web架构之缓存体系 立即下载

相关镜像