Hi experts,
I work normaly with hibernate Search 3.4 Final and all things is fine.But adding @Indexed with a specific entity generate erreur with Hibernate Search level and also with Lucene .
it show me this.
Code:
org.hibernate.HibernateException: could not init listeners
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1396)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at com.oalia.frmwrk.services.hibernate.HibernateServiceImpl.initJPASession(HibernateServiceImpl.java:230)
at com.oalia.frmwrk.services.hibernate.HibernateServiceImpl.start(HibernateServiceImpl.java:122)
at com.oalia.frmwrk.services.ServiceLocator.start(ServiceLocator.java:136)
at com.oalia.frmwrk.services.ServiceLocator.registerService(ServiceLocator.java:276)
at com.oalia.frmwrk.services.ServiceLocator.getService(ServiceLocator.java:247)
at com.oalia.frmwrk.services.hibernate.OCPHibernate.getService(OCPHibernate.java:29)
at com.oalia.frmwrk.tools.init.task.CreateSchemaTask.execute(CreateSchemaTask.java:60)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
[] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: org.hibernate.search.SearchException: Unable to open Lucene IndexReader
at org.hibernate.search.reader.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:119)
at org.hibernate.search.reader.SharingBufferReaderProvider.initialize(SharingBufferReaderProvider.java:96)
at org.hibernate.search.reader.ReaderProviderFactory.createReaderProvider(ReaderProviderFactory.java:75)
at org.hibernate.search.impl.SearchFactoryImpl.<init>(SearchFactoryImpl.java:183)
at org.hibernate.search.event.ContextHolder.getOrBuildSearchFactory(ContextHolder.java:53)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:102)
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)
... 26 more
Caused by: org.apache.lucene.index.CorruptIndexException: Unknown format version: -11
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:247)
at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:72)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
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:114)
... 34 more
and this is the entity
Code:
...
@Indexed
@Entity
@Proxy(proxyClass = StoredFile.class)
@Inheritance(strategy = InheritanceType.JOINED)
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class StoredFileImpl implements StoredFile {
...