-->
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.  [ 8 posts ] 
Author Message
 Post subject: How to deploy hibernate search?
PostPosted: Wed Dec 09, 2009 3:54 pm 
Newbie

Joined: Wed Dec 09, 2009 3:42 pm
Posts: 5
I am running jboss4.2.3.GA and I am having problems getting hibernate search to work.

Looking at the compatibility matrix I think with jboss4.2.3.GA I need to use hibernate-search version 3.0.1. (I may upgrade later but I would like to get a small example working first).

I downloaded version 3.0.1 and put the jar in the jboss lib directory. Started jboss and I did not see anything out of the ordinary.

Am I missing something, or is all I really need to do for jboss is deploy the hibernate-search.jar?


Last edited by newmanw10 on Sat Dec 19, 2009 11:20 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Fri Dec 11, 2009 7:32 am 
Hibernate Team
Hibernate Team

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

it might be that you have to enable automatic indexing by adding the appropriate event listeners. Normally this happens automatically when you use Hibernate Annotations, but depending on the Annotations version in your container it might not happen.

If this does not help, can you provide your indexing and search code? Does the index directory get created? If so Hibernate Search gets at least bootstrapped. If not it is a good sign that the event listeners are not working.

--Hardy


Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Thu Dec 17, 2009 12:02 am 
Newbie

Joined: Wed Dec 09, 2009 3:42 pm
Posts: 5
No index file is even created.


Last edited by newmanw10 on Sat Dec 19, 2009 11:20 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Thu Dec 17, 2009 9:47 am 
Hibernate Team
Hibernate Team

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

Since not even the index directories beneath indexBase are getting created I would assume that the registration of the listeners is not working. I recommend to add the listeners manually to the configuration as per documentation.

--Hardy


Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Thu Dec 17, 2009 1:18 pm 
Newbie

Joined: Wed Dec 09, 2009 3:42 pm
Posts: 5
I have a jar file with my entities and META-INF/persistence.xml. I tried placing the config file at the root of the jar and also in the META-INF directory with the persistence.xml. Neither place looks to have worked, as I cannot see any log messages about hibernate picking up that file and parsing it.

Any other ideas?


Last edited by newmanw10 on Sat Dec 19, 2009 11:21 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Thu Dec 17, 2009 1:34 pm 
Hibernate Team
Hibernate Team

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

you can add the listener configuration directly to peristence.xml:
Code:
         <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
         <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
         <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>

META-INF is the right place to ave persistence.xml.

Regarding auto registration. You need a 3.3.x version of Annotations for this to work. Annotations should print a version string into the log files. Check the version number there. I could imagine that you are having conflicting jar files in your JBoss installation. Maye there is a older Annotations version in your shared lib directory. That used to be a quite common problem.

--Hardy


Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Fri Dec 18, 2009 5:16 pm 
Newbie

Joined: Wed Dec 09, 2009 3:42 pm
Posts: 5
Are those the only three listeners I can add to my persistence.xml?


Top
 Profile  
 
 Post subject: Re: How to deploy hibernate search?
PostPosted: Mon Dec 21, 2009 8:08 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Yes, this are the only listeners you need for this version of Hibernate Search.


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