-->
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: Hibernate search 3.4.2 + Infinispan + jboss as 7.1.1
PostPosted: Thu Aug 07, 2014 2:23 pm 
Newbie

Joined: Thu Aug 07, 2014 1:23 pm
Posts: 2
Hi everybody o/
I'm new in here, my english is very bad :/ i'm brazilian, so forgive me for any phrase bad formulated!
well, we will go to problem!
I have a project where i work with: Hibernate 3.6.10 + Spring 3.2.5 in JBoss AS7;
I need implemented the Hibernate Search in mode Cluster:

I'm trying make it with Infinispan;
I have this configuration:

Code:
   <!-- Hibernate Search-->

            <prop key="hibernate.search.default.directory_provider">infinispan</prop>
            <prop key="hibernate.search.infinispan.cachemanager_jndiname" >java:jboss/infinispan/container/web</prop>
            <prop key="hibernate.search.infinispan.chunk_size">300000000</prop>
            <prop key="hibernate.search.reader.strategy">shared</prop>
             <prop key="hibernate.search.worker.execution">sync</prop>
             <prop key="hibernate.search.jmx_enabled">true</prop>
            <prop key="hibernate.search.​default.​exclusive_index_use">true</prop>             
         <!--<prop key="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</prop> -->
            <prop key="hibernate.search.default.indexBase">/tmp_atual_infinispan/lucene_indexes</prop>
            <prop key="hibernate.search.analyzer">org.apache.lucene.analysis.br.BrazilianAnalyzer</prop>
             <prop key="hibernate.search.default.worker.backend">JGroups</prop>
         <!--   <prop key="hibernate.search.services.jgroups.clusterName">My-Custom-Cluster-Id</prop> -->
            <prop key="hibernate.ejb.event.post-insert">  org.hibernate.search.event.FullTextIndexEventListener </prop>
              <prop key="hibernate.ejb.event.post-update" > org.hibernate.search.event.FullTextIndexEventListener </prop>
              <prop key="hibernate.ejb.event.post-delete" > org.hibernate.search.event.FullTextIndexEventListener </prop>
             <prop key="hibernate.search.default.data_cachename">LuceneIndexesData</prop> 
               <prop key="hibernate.search.default.metadata_cachename">LuceneIndexesMetadata</prop>
               <prop key="hibernate.search.default.locking_cachename">LuceneIndexesLocking</prop>



I'm trying use cache directly from jboss, this way:

Code:
  <cache-container name="web" aliases="standard-session-cache" default-cache="LuceneIndexesData">
                <transport lock-timeout="60000"/>
                <replicated-cache name="repl" mode="ASYNC" batching="true">
                    <file-store/>
                </replicated-cache>
                <replicated-cache name="sso" mode="SYNC" batching="true"/>
                <replicated-cache name="LuceneIndexesMetadata" mode="SYNC" start="EAGER">
                    <binary-keyed-jdbc-store datasource="java:jboss/datasources/moto" shared="true" passivation="false" purge="false">
                        <property name="createTableOnStart">
                            true
                        </property>
                        <binary-keyed-table>
                            <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
                            <data-column name="DATUM" type="VARBINARY(8000)"/>
                        </binary-keyed-table>
                    </binary-keyed-jdbc-store>
                </replicated-cache>
                <replicated-cache name="LuceneIndexesData" mode="SYNC" start="EAGER">
                    <binary-keyed-jdbc-store datasource="java:jboss/datasources/moto" shared="true" passivation="false" purge="false">
                        <property name="createTableOnStart">
                            true
                        </property>
                        <binary-keyed-table>
                            <id-column name="ID_COLUMN" type="VARCHAR(255)"/>
                            <data-column name="DATUM" type="VARBINARY(8000)"/>
                        </binary-keyed-table>
                    </binary-keyed-jdbc-store>
                </replicated-cache>
                <replicated-cache name="LuceneIndexesLocking" mode="SYNC" start="EAGER"/>
                <distributed-cache name="dist" mode="ASYNC" batching="true">
                    <file-store/>
                </distributed-cache>
            </cache-container>


My jars in maven are:

Code:
<groupId>org.hibernate</groupId>
      <artifactId>hibernate-search-infinispan</artifactId>
      <version>3.4.2.Final</version>


Code:
<groupId>org.hibernate</groupId>
         <artifactId>hibernate-search</artifactId>
         <version>3.4.2.Final</version>



Code:
<groupId>org.hibernate</groupId>
            <artifactId>hibernate-infinispan</artifactId>
            <version>4.2.1.Final</version>



when i start jboss i get the error: org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager cannot be cast to org.infinispan.manager.EmbeddedCacheManager

how i can resolve this problems? any help is great importance o/

Thank you!!! I hope to improve my English o/


Top
 Profile  
 
 Post subject: Re: Hibernate search 3.4.2 + Infinispan + jboss as 7.1.1
PostPosted: Fri Aug 15, 2014 6:24 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi George,
sorry for the delay and don't worry for the english, it's very clear.

Would it be possible for you to upgrade your whole stack? These components are very old (from my perspective working on the latest things..). A lot of things have improved since then.
I would recommend you to use WildFly 8.1.0.Final instead of JBoss AS 7.1.1 (JBoss changed name to WildFly, so this is just a version upgrade, not a significant change in technology).
Then you could use the latest Hibernate ORM as included in WildFly and use Hibernate Search 4.5.1.Final, which also uses a much improved version of Infinispan.

Also I would suggest to pass an Infinispan configuration file to Hibernate Search rather than have the caches configured in the JBoss configuration: the format of the configuration file is different but Hibernate Search includes a working example.

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


Top
 Profile  
 
 Post subject: Re: Hibernate search 3.4.2 + Infinispan + jboss as 7.1.1
PostPosted: Mon Aug 18, 2014 2:36 pm 
Newbie

Joined: Thu Aug 07, 2014 1:23 pm
Posts: 2
hi Sanne o/
This project is from my work and we can't upgrade for some internal motives :/
The maximum that i could make was upgrade: Hibernate 4 + hibernate search 4
with the same configuration that i showed you above, i'm not getting success in the index the elements, i get this error:

Code:
15:24:05,334 ERROR [org.hibernate.search.exception.impl.LogErrorHandler] (Hibernate Search: Index updates queue processor for index br.com.atom.moto.anuncios.model.Usuario-1) HSEARCH000058: Exception occurred org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@.\br.com.atom.moto.anuncios.model.Usuario\write.lock
Primary Failure:
   Entity br.com.atom.moto.anuncios.model.Usuario  Id null  Work Type  org.hibernate.search.backend.PurgeAllLuceneWork
: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@.\br.com.atom.moto.anuncios.model.Usuario\write.lock
   at org.apache.lucene.store.Lock.obtain(Lock.java:84) [lucene-core-3.4.0.jar:3.4.0 1167142 - mike - 2011-09-09 09:02:09]
   at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1112) [lucene-core-3.4.0.jar:3.4.0 1167142 - mike - 2011-09-09 09:02:09]
   at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.createNewIndexWriter(IndexWriterHolder.java:125) [hibernate-search-engine-4.0.0.Final.jar:4.0.0.Final]
   at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:100) [hibernate-search-engine-4.0.0.Final.jar:4.0.0.Final]
   at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.getIndexWriter(AbstractWorkspaceImpl.java:114) [hibernate-search-engine-4.0.0.Final.jar:4.0.0.Final]
   at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:101) [hibernate-search-engine-4.0.0.Final.jar:4.0.0.Final]
   at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:69) [hibernate-search-engine-4.0.0.Final.jar:4.0.0.Final]
   at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.7.0_51]
   at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.7.0_51]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_51]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]
   at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]

15:24:05,358 ERROR [org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask] (Hibernate Search: Index updates queue processor for index br.com.atom.moto.anuncios.model.Usuario-1) HSEARCH000072: Couldn't open the IndexWriter because of previous error: operation skipped, index ouf of sync!


I am now trying with these versions: hibernate 4 + hibernate search 4.
About a configuration separately of the infinispan, you have a example for me.
Thanks for your time and help.
o/


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.