我根据此网站配置了二级缓存 http://www.cnblogs.com/iloveu/archive/2009/02/16/1391392.html
现在报出
[code="java"]1.%%%% Error Creating SessionFactory %%%%
2.org.hibernate.MappingException: invalid configuration
3. at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2241)
4. at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:230)
5. at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:71)
6. at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
7. at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:212)
8. at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:71)
9. at com.huawei.ifree.autotest.log.analyse.platform.db.HibernateSessionFactory.updateHibernateCfg(HibernateSessionFactory.java:62)
10. at com.huawei.ifree.autotest.log.analyse.platform.db.HibernateSessionFactory.(HibernateSessionFactory.java:44)
11. at com.huawei.ifree.autotest.log.analyse.platform.servlet.ActivatorServlet.init(ActivatorServlet.java:53)
12. at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
13. at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
14. at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
15. at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
16. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
17. at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
18. at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
19. at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
20. at org.apache.catalina.core.StandardService.start(StandardService.java:519)
21. at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
22. at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
23. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
24. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
25. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
26. at java.lang.reflect.Method.invoke(Unknown Source)
27. at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
28. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
29.Caused by: org.xml.sax.SAXParseException: The content of element type "session-factory" must match "(property*,mapping*,(class-cache|collection-cache)*,event*,listener*)".
30. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
31. at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
32. at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:371)
33. at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:305)
34. at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1918)
35. at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:851)
36. at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1008)
37. at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
38. at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
39. at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
40. at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
41. at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
42. at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
43. at org.dom4j.io.SAXReader.read(SAXReader.java:465)
44. at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2238)
45. ... 25 more
[/code]
hibernate缓存问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
10条回答 默认 最新
- myali88 2011-08-09 18:59关注
[quote]查询缓存是直接缓存已经执行的那一条sql语句吗? 如果下次碰到语句一样的, 就到缓存里面去找吗?[/quote]
对啊,查询条件都要一样。本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥20 Keil uVision5创建project没反应
- ¥15 mmseqs内存报错
- ¥15 vika文档如何与obsidian同步
- ¥15 华为手机相册里面的照片能够替换成自己想要的照片吗?
- ¥15 陆空双模式无人机飞控设置
- ¥15 sentaurus lithography
- ¥100 求抖音ck号 或者提ck教程
- ¥15 关于#linux#的问题:子进程1等待子进程A、B退出后退出(语言-c语言)
- ¥20 web页面如何打开Outlook 365的全球离线通讯簿功能
- ¥15 io.jsonwebtoken.security.Keys