开发者社区> 问答> 正文

DLOG4J_E32启动不报错,访问报错?报错

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

    我在部署应用后,访问首页报错:

    环境:jdk1.6 + tomcat6.0.35 + mysql5.5.12

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.listIgnoreQueryCache(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.executeNamedQuery(DAO.java:434)
	at com.liusoft.dlog4j.dao.DiaryDAO.listRecommendArticles(DiaryDAO.java:130)
	at com.liusoft.dlog4j.velocity.DLOG_Home_VelocityTool.list_recommend_articles(DLOG_Home_VelocityTool.java:130)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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.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.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:617)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liusoft.dlog4j.servlet.DLOG_HomeFilter.doFilter(DLOG_HomeFilter.java:121)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.liusoft.dlog4j.servlet.DLOG_HibernateFilter.doFilter(DLOG_HibernateFilter.java:76)
	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:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'diaryoutli0_.diary_annex' 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)
	... 68 more

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

    dlog_diary表少了个diary_annex字段。很久没去维护这个项目了,主要是那个数据库结构可能会有缺失

    2020-06-22 17:13:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载