-->
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.  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu Apr 23, 2015 7:35 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Application I am working with, is using following dependencies;
- lucene-core 3.6.2
- lucene-analyzers 3.6.2
- lucene-queryparser 3.6.2

- Hibernate Search ORM 4.4.2.Final
- Hibernate Search Engine 4.4.2.Final

Now, after upgrading to hibernate search 5.2.0 BETA1, application ran into build issues and is unable to find following classes/methods/constructors

- org.hibernate.search.engine.spi.SearchFactoryImplementor;
- org.apache.lucene.index.TermDocs;
- org.apache.lucene.search.WildcardTermEnum;
- org.apache.lucene.document.Fieldable;
- QueryParser(Version, String, Analyzer)
- org.apache.lucene.analysis.util.CharacterUtils codePointAt(char[], int)
- org.apache.lucene.analysis.Analyzer public TokenStream tokenStream(String fieldName, Reader reader) – This method
is now final. In application code this method is overridden, Is there any alternative?

Please suggest, how to get past these errors?


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri Apr 24, 2015 11:29 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
the Hibernate Search 5 release was a significant step forward and we could not maintain compatibility with Hibernate Search 4.
You'll have to make some simple changes to your application, so this is expected indeed.

We wrote a migration guide which can be found here:
http://hibernate.org/search/documentation/migrate/5.0/

This guide only covers the API from org.hibernate packages; to learn about the changes in org.apache.lucene this might also be handy:
https://lucene.apache.org/core/4_10_0/MIGRATE.html

Some general hints: "Version" is no longer passed to things like the QueryParser and Analyzers.
For changes regarding the Analyzer API, I would suggest to ask to the Apache Lucene user's mailing list.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 07, 2015 7:17 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

After migrating to 5.2.0 Beta1 and fixing build and compatibility issues I am running into following exception when I try to generate indexes;

[java] java.lang.NoSuchMethodError: org.apache.lucene.store.NativeFSLockFactory.<init>(Ljava/io/File;)V
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: java.lang.NoSuchMethodError: org.apache.lucene.store.NativeFSLockFactory.<init>(Ljava/io/File;)V
[java] at org.hibernate.search.store.impl.DefaultLockFactoryCreator.createLockFactory(DefaultLockFactoryCreator.java:60)
[java] at org.hibernate.search.store.impl.DirectoryProviderHelper.getLockFactory(DirectoryProviderHelper.java:115)
[java] at org.hibernate.search.store.impl.DirectoryProviderHelper.createFSIndex(DirectoryProviderHelper.java:101)
[java] at org.hibernate.search.store.impl.FSDirectoryProvider.initialize(FSDirectoryProvider.java:53)
[java] at org.hibernate.search.store.spi.BaseDirectoryProviderService.initialize(BaseDirectoryProviderService.java:64)
[java] at org.hibernate.search.store.spi.BaseDirectoryProviderService.create(BaseDirectoryProviderService.java:52)
[java] at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.createDirectoryProvider(DirectoryBasedIndexManager.java:200)
[java] at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:86)
[java] at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:256)
[java] at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:513)
[java] at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:482)
[java] at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:91)
[java] at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:358)
[java] at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199)
[java] at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBuilder.java:117)
[java] at org.hibernate.search.hcore.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:66)
[java] at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:52)
[java] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:588)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
[java] at com.zzz.dao.lucene.SearchDaoLucene.main(SearchDaoLucene.java:1754)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)

Please suggest, what am I missing here?

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 07, 2015 7:52 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
you're probably having the wrong version of Apache Lucene on the classpath. You have to use version 4.10.4.

Also note that Hibernate Search version 5.2.0.Final was released.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 07, 2015 8:33 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Ok, I'll upgrade to Hibernate Search version 5.2.0.Final. But should I be using lucene 4.10.4 with Hibernate Search version 5.2.0.Final or can I upgrade to lucene 5.1.0?

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 07, 2015 9:11 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
But should I be using lucene 4.10.4 with Hibernate Search version 5.2.0.Final

Yes

Quote:
can I upgrade to lucene 5.1.0

No

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri May 08, 2015 2:39 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

As suggested I've upgraded dependencies as listed below;

hibernate-core 5.0.0.Beta2
hibernate-validator 4.3.2.Final
hibernate-ehcache 5.0.0.Beta2
hibernate-search-engine 5.2.0.Final
hibernate-search-orm 5.2.0.Final
hibernate-search-analyzers 5.0.0.Alpha1
hibernate-entitymanager 5.0.0.Beta2
hibernate-envers 5.0.0.Beta2
hibernate-c3p0 5.0.0.Beta2

lucene-analyzers 3.6.2
lucene-queryparser 4.10.4
lucene-core 4.10.4
lucene-analyzers-common 4.10.4

ehcache 2.8.3
ehcache-jgroupsreplication 1.7
jgroups 3.3.4.Final

Now there is following exception when I try to create indexes;

[java] 2015-05-08 11:47:19,376 INFO [main] { } Version | HV000001: Hibernate Validator 4.3.2.Final
[java] java.lang.AbstractMethodError
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
[java] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[java] at org.apache.tools.ant.Task.perform(Task.java:348)
[java] at org.apache.tools.ant.Target.execute(Target.java:435)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:456)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
[java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:851)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:235)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[java] Caused by: java.lang.AbstractMethodError
[java] at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:291)
[java] at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:747)
[java] at com.zzz.dao.lucene.SearchDaoLucene.main(SearchDaoLucene.java:1754)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:601)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[java] ... 46 more
[java] Java Result: -1

Please suggest.

Thanks


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri May 08, 2015 8:59 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
glad you update Hibernate Search to 5.2.0.Final, but you really can't mix the other dependency versions freely.

please change:
- hibernate-core, hibernate-entitymanager, hibernate-envers, hibernate-c3p0 to version 4.3.9.Final
- lucene-analyzers needs to be replaced with lucene-analyzers-common version 4.10.4

The basics of this is documented here:
http://docs.jboss.org/hibernate/search/5.2/reference/en-US/html_single/#_required_libraries

For exact details on each version we've used for building and testing, the best place is to look in our pom.xml in the sources of the project:
https://github.com/hibernate/hibernate-search/blob/5.2.0.Final/pom.xml#L144

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 14, 2015 6:19 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Thanks for your inputs, migration is completed and it works perfectly when indexes are created in a single thread.
Since we've a multi-tenant app and we are trying to create indexes for all tenants using multi-threading. In this scenario we get following exception (changing hibernate.search.default.exclusive_index_use value to false didn't help);

ERROR [Hibernate Search sync consumer thread for index zzz] { } LuceneBackendQueueTask | HSEARCH000072: Couldn't open the IndexWriter because of previous error: operation skipped, index ouf of sync!
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@D:\zzz\zzz\zzz\tomcat-7\tomcat-7\work\zzz\write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:89)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:755)
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.createNewIndexWriter(IndexWriterHolder.java:131)
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:97)
at org.hibernate.search.backend.impl.lucene.AbstractCommitPolicy.getIndexWriter(AbstractCommitPolicy.java:32)
at org.hibernate.search.backend.impl.lucene.SharedIndexCommitPolicy.getIndexWriter(SharedIndexCommitPolicy.java:77)
at org.hibernate.search.backend.impl.lucene.SharedIndexWorkspaceImpl.getIndexWriter(SharedIndexWorkspaceImpl.java:36)
at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:81)
at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:47)
at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.applyChangesets(SyncWorkProcessor.java:145)
at org.hibernate.search.backend.impl.lucene.SyncWorkProcessor$Consumer.run(SyncWorkProcessor.java:135)

Please suggest.

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 14, 2015 7:28 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
That looks like you're not using the Hibernate ORM implementation of multi-tenancy, as our code wouldn't compete for that lock otherwise.
Are you starting multiple Hibernate SessionFactory(s)?

You can use multiple independent SessionFactory instances, but then you should configure the indexes to be stored in a different base directory for each tenant.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 14, 2015 8:44 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Thanks for prompt reply and your insight.
There were multiple session factories being created, fixed that part and looks like it's working fine now.

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Thu May 14, 2015 9:21 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Great! glad you got it working

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri May 15, 2015 6:38 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Now application is throwing following exception while saving/indexing entities;

2015-05-15 15:13:56,450 ERROR [http-bio-8080-exec-5] { p:zzz} ExceptionReporter | execution(public abstract com.zzz.service.dto.CustomerDTO com.zzz.airs.service.CustomerService.saveCustomer(com.zzz.service.dto.CustomerDTO)) (com.zzz.service.dto.CustomerDTO:) Error while
indexing in Hibernate Search (before transaction completion); nested exception is org.hibernate.HibernateException: Error while indexing in Hibernate Search (before transaction completion)
Error while indexing in Hibernate Search (before transaction completion); nested exception is org.hibernate.HibernateException: Error while indexing in Hibernate Search (before transaction completion)
at com.zzz.service.aop.ExceptionReporter.report(ExceptionReporter.java:49)
at com.zzz.util.MDCUserFilter.doFilter(MDCUserFilter.java:39)
at com.zzz.webapp.SessionCleanupFilter.doFilterInternal(SessionCleanupFilter.java:54)
Error while indexing in Hibernate Search (before transaction completion)
at com.zzz.service.aop.ExceptionReporter.report(ExceptionReporter.java:49)
at com.zzz.util.MDCUserFilter.doFilter(MDCUserFilter.java:39)
at com.zzz.webapp.SessionCleanupFilter.doFilterInternal(SessionCleanupFilter.java:54)
Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: class com.zzz.model.arts.KeyCustomer
at com.zzz.service.aop.ExceptionReporter.report(ExceptionReporter.java:49)
at com.zzz.util.MDCUserFilter.doFilter(MDCUserFilter.java:39)
at com.zzz.webapp.SessionCleanupFilter.doFilterInternal(SessionCleanupFilter.java:54)

Please suggest.

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri May 15, 2015 8:22 am 
Newbie

Joined: Tue Dec 30, 2014 6:52 pm
Posts: 10
Hello Sanne Grinovero,

Prior to upgrading to version 5 from 4 following worked
========
class B extends class A - none of the entities are marked @Indexed but entity A has @Field annotation on few attributes.
========

Now after upgrading to version 5 app gives exception as mentioned in post above.

To fix this entity B has been marked with @Indexed and now it works. Am I missing something or did something change between version 4 and 5 that caused this issue.

Please suggest.

Thanks.


Top
 Profile  
 
 Post subject: Re: Migrating to Hibernate Search-5.2.0.Beta1
PostPosted: Fri Nov 06, 2015 5:12 am 
Newbie

Joined: Fri Nov 06, 2015 5:06 am
Posts: 12
Hi,

I have a requirement to migrate hibernate from 4.2.2.Final to the latest stable one. I am using now hibernate 5.0.2.Final which I guess is the latest stable version released. I am using lucene indexing with it and I have also migrated it to 5.3.1 version. But I am getting the following error :


[11/6/15 2:54:27:955 EST] 000000a3 SystemErr R at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
[11/6/15 2:54:27:955 EST] 000000a3 SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[11/6/15 2:54:27:956 EST] 000000a3 SystemErr R at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
[11/6/15 2:54:27:957 EST] 000000a3 SystemErr R Caused by: java.lang.NoSuchMethodError: org/apache/lucene/store/NativeFSLockFactory.<init>(Ljava/io/File;)V
[11/6/15 2:54:27:958 EST] 000000a3 SystemErr R at org.hibernate.search.store.impl.DefaultLockFactoryCreator.createLockFactory(DefaultLockFactoryCreator.java:60)
[11/6/15 2:54:27:958 EST] 000000a3 SystemErr R at org.hibernate.search.store.impl.DirectoryProviderHelper.getLockFactory(DirectoryProviderHelper.java:138)
[11/6/15 2:54:27:958 EST] 000000a3 SystemErr R at org.hibernate.search.store.impl.DirectoryProviderHelper.createFSIndex(DirectoryProviderHelper.java:124)
[11/6/15 2:54:27:958 EST] 000000a3 SystemErr R at org.hibernate.search.store.impl.FSDirectoryProvider.initialize(FSDirectoryProvider.java:53)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.store.spi.BaseDirectoryProviderService.initialize(BaseDirectoryProviderService.java:64)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.store.spi.BaseDirectoryProviderService.create(BaseDirectoryProviderService.java:52)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.createDirectoryProvider(DirectoryBasedIndexManager.java:230)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:90)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:256)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:513)
[11/6/15 2:54:27:959 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManagers(IndexManagerHolder.java:482)
[11/6/15 2:54:27:960 EST] 000000a3 SystemErr R at org.hibernate.search.indexes.impl.IndexManagerHolder.buildEntityIndexBinding(IndexManagerHolder.java:91)
[11/6/15 2:54:27:960 EST] 000000a3 SystemErr R at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:358)
[11/6/15 2:54:27:960 EST] 000000a3 SystemErr R at org.hibernate.search.spi.SearchIntegratorBuilder.buildNewSearchFactory(SearchIntegratorBuilder.java:199)
[11/6/15 2:54:27:960 EST] 000000a3 SystemErr R at org.hibernate.search.spi.SearchIntegratorBuilder.buildSearchIntegrator(SearchIntegratorBu




Can someone please help me with it? It is very urgent.. Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 19 posts ]  Go to page 1, 2  Next

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.