-->
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.  [ 5 posts ] 
Author Message
 Post subject: Hibernate Search 4.0.0.Final does not automatically indexing
PostPosted: Thu Jan 12, 2012 6:40 am 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Hello,

I recently migrated from Hibernate Search 3.6 to Hibernate Hibernate 4.0.0 and Hibernate core 4.0. Since this migration, indexing is no longer done automatically (folders aren't created, even when an object is saved).

My pom.xml (only changes)

Code:
...
   <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-core</artifactId>
         <version>4.0.0.Final</version>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-search</artifactId>
         <version>4.0.0.Final</version>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-entitymanager</artifactId>
         <version>4.0.0.Final</version>
      </dependency>
...


My persistence.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
   xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation=   "http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">


   <persistence-unit name="DataCrawlerDS"
      transaction-type="JTA">

      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>jdbc/TestPoolGlassfish</jta-data-source>

      <class>fr.inf21project.entity.CrawledDocument</class>
      <properties>
         <property name="hibernate.show_sql" value="false" />
         <property name="hibernate.hbm2ddl.auto" value="update" />

         <property name="hibernate.search.default.directory_provider"
            value="filesystem" />

         <property name="hibernate.search.default.indexBase" value="../demo_tika_lucene/indexes" />
      </properties>
   </persistence-unit>
</persistence>


I use JPA interfaces (EntityManager), not hibernate session.

Thanks you :)


Top
 Profile  
 
 Post subject: Re: Hibernate Search 4.0.0.Final does not automatically indexing
PostPosted: Thu Jan 12, 2012 8:27 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
do you see any error in the logs? Any warning worth mentioning?
It's supposedly not needing configuration changes.

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search 4.0.0.Final does not automatically indexing
PostPosted: Thu Jan 12, 2012 8:58 am 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
Thanks for your answer, yes i have this entry in my log :

Code:
[#|2012-01-12T13:52:39.357+0100|INFO|glassfish3.1.1|org.hibernate.cfg.search.HibernateSearchEventListenerRegister|_ThreadID=21;_ThreadName=Thread-2;|Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.|#]


I'll search the solution, but if you have one, i'm interested :)


Top
 Profile  
 
 Post subject: Re: Hibernate Search 4.0.0.Final does not automatically indexing
PostPosted: Thu Jan 12, 2012 9:14 am 
Newbie

Joined: Thu Jan 12, 2012 6:28 am
Posts: 12
I'm sorry i found the solution...

I installed hibernate 3 from glassfish update manager.
There must be a conflict between Hibernate 4 (installed by the project) and Hibernate 3.

I searched for days I had completely forgotten that I installed Hibernate 3 :)

EDIT : I also remove the old version of antlr (2.7.6) that caused problems on my NamedQueries.


Top
 Profile  
 
 Post subject: Re: Hibernate Search 4.0.0.Final does not automatically indexing
PostPosted: Thu Jan 12, 2012 11:19 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
glad you found it, and thanks to report it back.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.