严重: DLOG_VelocityServlet: 127.0.0.1 => ERROR:Unknown Velocity Error,url=http://localhost:8093/(Mon Jul 22 16:40:57 CST 2013) ?

对岸 发布于 2013/07/22 17:08
阅读 893
收藏 0

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

1.启动tomcat之后报错如下,网上查了一下,有的说是表里面没有对应的域(Unknown column 'sitebean0_.friend_status' in 'field list')————但错误信息里面好像看不到具体是哪个表缺少域,而且就算是缺少对应的域的话,那么该如何解决呢?

2.如果是其他的原因,那又该如何解决呢?



错误信息:

七月 22, 2013 4:40:57 下午 org.hibernate.cache.StandardQueryCache <init>
信息: starting query cache at region: dlog_home_info
七月 22, 2013 4:40:57 下午 org.hibernate.cache.StandardQueryCache <init>
信息: starting query cache at region: query.newest.sites
七月 22, 2013 4:40:57 下午 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 1054, SQLState: 42S22
七月 22, 2013 4:40:57 下午 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: Unknown column 'sitebean0_.friend_status' in 'field list'
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
信息:  Velocity  [error] Method list_newest_sites threw exception for reference $DLOG4J_tool in template /dlog/_sub/_module_side_new_sites.vm at  [5,31]
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
信息:  Velocity  [error] VelocityViewServlet: Exception processing the template: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'list_newest_sites' in  class com.liusoft.dlog4j.velocity.DLOG_Home_VelocityTool threw exception org.hibernate.exception.SQLGrammarException: could not execute query @ /dlog/_sub/_module_side_new_sites.vm[5,44]
七月 22, 2013 4:40:57 下午 org.apache.catalina.core.ApplicationContext log
严重: DLOG_VelocityServlet: 127.0.0.1 => ERROR:Unknown Velocity Error,url=http://localhost:8093/(Mon Jul 22 16:40:57 CST 2013)
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:601)
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:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liusoft.dlog4j.servlet.DLOG_HomeFilter.doFilter(DLOG_HomeFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liusoft.dlog4j.servlet.DLOG_HibernateFilter.doFilter(DLOG_HibernateFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:881)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:674)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:541)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:722)
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)
... 67 more

加载中
0
黑夜的白羊
黑夜的白羊
遇到相同问题,解决了没?
0
红薯
红薯

引用来自“米粉”的答案

遇到相同问题,解决了没?

不对啊,你们从哪里现在的版本啊?

请到这里下载:http://git.oschina.net/ld/dlog4j_e32

对岸
对岸
1.在这里下的(就是下面的软件下载链接),网址都是一样的; 2.楼下的说数据库不完整,应该不是这个原因……
0
黑夜的白羊
黑夜的白羊

引用来自“红薯”的答案

引用来自“米粉”的答案

遇到相同问题,解决了没?

不对啊,你们从哪里现在的版本啊?

请到这里下载:http://git.oschina.net/ld/dlog4j_e32

就是在这下载的zip包,然后导入eclipse,运行就报错了。

是不是数据库不完整,有很多数据库脚本,没有全部执行

0
对岸
对岸

引用来自“米粉”的答案

遇到相同问题,解决了没?
没有
0
黑夜的白羊
黑夜的白羊

引用来自“B_qxzb”的答案

引用来自“米粉”的答案

遇到相同问题,解决了没?
没有

现在没有上面的那个错误了,是因为数据库有些更新语句没有没有执行,导致数据库表缺少字段。

重新执行了一遍dlog4j_e32\doc\Update_sql  中的mysql_script.sql文件以及一个乱码文件名的内的一些脚本。现在已经可以在本地电脑跑起来。现在至试了注册、写了片日志。

目前有些标签直接显示了...

环境:win8+mysql5.6+tomcat6.28+eclipse4.3+jdk1.6 


chenjinjun
chenjinjun
回复 @B_qxzb : 同样有此问题 都是??? 问号
对岸
对岸
@米粉 哎。
黑夜的白羊
黑夜的白羊
回复 @B_qxzb : 我创建数据库即utf8,注册的时候没有发现乱码
对岸
对岸
1.的确如此,我按照安装说明里的步骤做的,结果那个sql文件是以前的,要用更新之后的版本 2.你登陆首页出现的标签显示错误,我没有出现;但我把alter database dlog character set utf8之后,注册时和写日志时的中文都是问号……
0
对岸
对岸
mysql> show variables like 'character%';
+--------------------------+----------------------------------------------------
-----+
| Variable_name            | Value
     |
+--------------------------+----------------------------------------------------
-----+
| character_set_client     | latin1
     |
| character_set_connection | latin1
     |
| character_set_database   | utf8
     |
| character_set_filesystem | binary
     |
| character_set_results    | latin1
     |
| character_set_server     | latin1
     |
| character_set_system     | utf8
     |
| character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.1\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)


mysql>
对岸
对岸
数据库字符集已经设置成了utf8,怎么还会乱码。。。
0
footmanff
footmanff

文档要跟上啊。。。起码安装说明要更新下么。。。。

我也碰到一样的问题了。。。

0
footmanff
footmanff

数据库脚本要用dlog4j_e32/doc/Update_sql/mysql_script.sql

文档说的目录下的脚本再mysql 5.6下无法运行的

返回顶部
顶部