问题:
2011-11-16 09:12:03 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not init listeners
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.hibernate.HibernateException: could not init listeners
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1983)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 36 more
Caused by: org.hibernate.search.SearchException: Unable to open Lucene IndexReader
at org.hibernate.search.reader.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:118)
at org.hibernate.search.reader.SharingBufferReaderProvider.initialize(SharingBufferReaderProvider.java:95)
at org.hibernate.search.reader.ReaderProviderFactory.createReaderProvider(ReaderProviderFactory.java:76)
at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:278)
at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:151)
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
... 43 more
Caused by: org.apache.lucene.index.CorruptIndexException: Incompatible format version: 3 expected 2 or lower
at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:141)
at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(SegmentReader.java:290)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:580)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:556)
at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:113)
at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:29)
at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:81)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:736)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:428)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:288)
at org.hibernate.search.reader.SharingBufferReaderProvider.readerFactory(SharingBufferReaderProvider.java:169)
at org.hibernate.search.reader.SharingBufferReaderProvider$PerDirectoryLatestReader.<init>(SharingBufferReaderProvider.java:243)
at org.hibernate.search.reader.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:113)
... 51 more
解决方法:
将Lucene下生成的文件删除(适合开发时候),要不要重建就看需要
分享到:
相关推荐
### Lucene笔记:全文检索的实现机制 #### 全文检索与中文支持 在全文检索领域,Lucene作为一款开源的高性能全文检索引擎,被广泛应用于各种场景之中。特别是对于中文用户而言,如何确保Lucene能够高效地支持中文...
Lucene是一个基于Java的全文索引工具包。 1. 基于Java的全文索引引擎Lucene简介:关于作者和Lucene的历史 2. 全文检索的实现:Luene全文索引和数据库索引的比较 3. 中文切分词机制简介:基于词库和自动切分词算法的...
赠送jar包:lucene-core-7.7.0.jar; 赠送原API文档:lucene-core-7.7.0-javadoc.jar; 赠送源代码:lucene-core-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-core-7.7.0.pom; 包含翻译后的API文档:lucene...
由于林良益先生在2012之后未对IKAnalyzer进行更新,后续lucene分词接口发生变化,导致不可使用,所以此jar包支持lucene6.0以上版本
2. **创建索引**: 使用Lucene.Net的`Directory`类(如`FSDirectory`)创建一个目录来存储索引。然后,通过`Analyzer`接口实现分词器。在这个例子中,我们将使用盘古分词的`PanguAnalyzer`类。创建一个`IndexWriter`...
2. **Lucene的主要组件** - **Analyzer**:分析器负责将输入的文本分解为可搜索的词元(Token),处理包括分词、删除停用词、词形还原等。 - **IndexWriter**:用于创建和更新索引,它负责将文档写入索引,并管理...
赠送jar包:lucene-sandbox-6.6.0.jar; 赠送原API文档:lucene-sandbox-6.6.0-javadoc.jar; 赠送源代码:lucene-sandbox-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-sandbox-6.6.0.pom; 包含翻译后的API...
赠送jar包:lucene-spatial3d-6.6.0.jar; 赠送原API文档:lucene-spatial3d-6.6.0-javadoc.jar; 赠送源代码:lucene-spatial3d-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-spatial3d-6.6.0.pom; 包含...
在搜索引擎和信息检索领域,Apache Lucene 是一个广泛使用的全文搜索库。它的核心功能包括索引、查询解析、评分和结果排序。而Lucene Collector则是其中一个重要组件,它负责在查询执行过程中收集满足条件的文档,并...
java源系统apache-lucene开头 “ Apache Lucene的开始:Java /开源/全文搜索系统的构建”的代码kata。 这是关口浩二(Koji Sekiguchi)的“ Apache Lucene简介:Java,开放源代码和全文本搜索系统的构建”(2006年...
赠送jar包:lucene-spatial3d-7.3.1.jar; 赠送原API文档:lucene-spatial3d-7.3.1-javadoc.jar; 赠送源代码:lucene-spatial3d-7.3.1-sources.jar; 赠送Maven依赖信息文件:lucene-spatial3d-7.3.1.pom; 包含...
Lucene 是一个基于 Java 的开源搜索库。 Lucene 是一个非常流行且快速的搜索库,用于基于 Java 的应用程序中,以非常简单有效的方式为任何类型的应用程序添加文档搜索功能。 Lucene 功能:- 强大、准确且高效的搜索...
You should also see files called lucene-queryparser-{version}.jar, lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar under queryparser, analysis/common/ and demo/, respectively.
lucene官网: http://lucene.apache.org (lucene-4.0.0.zip ) 中文分词器: 1. http://code.google.com/p/ik-analyzer/ (IK_Analyzer_2012FF_hf1.zip) 2. https://code.google.com/p/mmseg4j/ (mmseg4j-1.9.1.v...
赠送jar包:lucene-spatial3d-7.2.1.jar; 赠送原API文档:lucene-spatial3d-7.2.1-javadoc.jar; 赠送源代码:lucene-spatial3d-7.2.1-sources.jar; 赠送Maven依赖信息文件:lucene-spatial3d-7.2.1.pom; 包含...
2. 初始化项目 创建一个名为bookshop的数据库,将bookshop.sql导入 打开IntelliJ IDEA,将项目导入 修改jdbc.properties文件配置,同时配置Tomcat 开始运行,访问http://localhost:8080/home.do 实现功能 登录 上传...
赠送jar包:lucene-spatial3d-6.6.0.jar; 赠送原API文档:lucene-spatial3d-6.6.0-javadoc.jar; 赠送源代码:lucene-spatial3d-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-spatial3d-6.6.0.pom; 包含...
Lucene学习总结之三:Lucene的索引文件格式(2) Lucene学习总结之三:Lucene的索引文件格式(3) Lucene学习总结之四:Lucene索引过程分析(1) Lucene学习总结之四:Lucene索引过程分析(2) Lucene学习总结之四...
《Apache Lucene 6.6.0:全文检索与索引库详解》 Apache Lucene 是一个开源的全文检索库,由Java编写,为开发者提供了强大的文本搜索功能。6.6.0 版本作为官方的最新完整版,集成了众多优化和改进,旨在提供更加...
【Lucene:基于Java的全文检索引擎简介】 Lucene是一个由Java编写的开源全文检索引擎工具包,由Doug Cutting创建并贡献给Apache基金会,成为Jakarta项目的一部分。它不是一个独立的全文检索应用,而是提供了一个可...