-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: @Indexed generates an error with one of my entities
PostPosted: Fri Nov 25, 2011 9:40 am 
Newbie

Joined: Mon Sep 19, 2011 5:05 am
Posts: 14
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 {
...


Top
 Profile  
 
 Post subject: Re: @Indexed generates an error with one of my entities
PostPosted: Wed Nov 30, 2011 5:33 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

looks to me like there is an old index somewhere? Have you upgraded Search and still some old index directories? What directories (indexes) do you have in your index base directory?
If this also happens when you start from scratch with an empty index directory, can you describe how this happens? Are there any other entities involved? Does this exception occur the moment the application starts up? What's in the log with debug/trace enabled?

--Hardy


Top
 Profile  
 
 Post subject: Re: @Indexed generates an error with one of my entities
PostPosted: Tue Dec 06, 2011 6:15 am 
Newbie

Joined: Mon Sep 19, 2011 5:05 am
Posts: 14
Hi Hardy ,
Thanks for reply .
I discovered a conflict between the jars, Hibernate Search 3.4 et lucene 3.0.3.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.