hibernate 测试报了堆错!哥哥们帮忙看看呀!小弟刚学,不会解决这些!
INFO: Server startup in 4843 ms
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Hibernate: select employee0_.id as id0_, employee0_.name as name0_, employee0_.sex as sex0_, employee0_.business as business0_, employee0_.address as address0_, employee0_.re as re0_ from tab_employee employee0_
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2147)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
at org.hibernate.loader.Loader.list(Loader.java:2023)
......................
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:724)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'user.tab_employee' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
.................at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2144)
... 31 more
十一月 13, 2013 3:41:55 下午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十一月 13, 2013 3:41:55 下午 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)hibernate报错

解决方案 »

  1.   

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'user.tab_employee' doesn't exist看一下你的实体怎么配置的。
      

  2.   

     'user.tab_employee' 是不是 user.tab_employee 整个当成表了
    其实你想是user 是数据库,tab_employee是表。看下配置。
      

  3.   


    果真如你们所说!现在错误少了一个!下面两个错,好像是taglib标签的问题,我也搞不定!
    哥们在看看!谢谢!log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Hibernate: select employee0_.id as id0_, employee0_.name as name0_, employee0_.sex as sex0_, employee0_.business as business0_, employee0_.address as address0_, employee0_.re as re0_ from tab_employee employee0_
    十一月 13, 2013 4:58:52 下午 org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)十一月 13, 2013 4:58:52 下午 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [QueryEmployee] in context with path [/10.9] threw exception [The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application] with root cause
    org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:445)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311)
    at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:152)
      

  4.   

    哥,我加了两个jar包,这个错不报!但是报下面的错了:
    INFO: Server startup in 5320 ms
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Hibernate: select employee0_.id as id0_, employee0_.name as name0_, employee0_.sex as sex0_, employee0_.business as business0_, employee0_.address as address0_, employee0_.re as re0_ from tab_employee employee0_
    十一月 13, 2013 5:10:12 下午 org.apache.jasper.compiler.TldLocationsCache tldScanJar
    INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    十一月 13, 2013 5:10:12 下午 org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    。。
    十一月 13, 2013 5:10:12 下午 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [QueryEmployee] in context with path [/10.9] threw exception [java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator] with root cause
    java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

      

  5.   

    少jar了。
      

  6.   

    我应该添加哪个jar包,jstl.jar standard.jar 这两个已经加上了
      

  7.   

    java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator,找不到这个类,包中的类不全可能是你加的那两个包本身有问题
      

  8.   

    您给我发发两个包吧!
    [email protected]
      

  9.   

     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'user.tab_employee' doesn't exist
    表不存在啊 
    看一下url是否正确
      

  10.   

    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    需要你在src下配置log4j.properties文件
    org.hibernate.exception.SQLGrammarException: could not execute query
    语法,你把上面的sql直接拷贝的到数据库中执行,看是不是可以
      

  11.   

    您给我发发两个包吧!
    [email protected]我这也没有现成的,网上一大堆,去找找,下一个就行,如果还是不行就是不包的问题了