: following the interceptor method (the second one in : http://www.hibernate.org/138.html)
I don't know much about hibernate, but I think i understand both of your questions... : 1. Lucene's doesn't create the needed folder structure the first time : and it complains that it can't find segments. : : /Applications/OpenLaszlo Server : 3.1/Server/tomcat-5.0.24/webapps/com.estudiowebs.CMS/WEB-INF/luceneIndex/segments : (No such file or directory) If you look at the javadocs for IndexWriter, you'll note that the last argument in the constructor indicates wether or not you want the IndexWriter to make a new index, or open an existing index. In the URL you cited, the arg is allways false -- so unless you've got seperate code in your application that uses an IndexWriter to create the index, It's not suprising that the code in the article would generate an error like that. : 2. My database uses native ids which means that in the interceptor : onSave() method the id is null and it throws an exception. if you copied the onSave method exactly as it appears, then i'm not sure how a null id could ever cause it to throw an exception ("null instanceof Long" will be false, and the method should do nothing) but if you read the comments at the bottom on the page, you'll see suggestions to use something called a "PostInsertEventListener" instead. ...a side commentary on this article -- the hibernate side of things may make perfect sense to someone who understands hibernate really well, but as someone who (I like to think) understands the basics of Lucene very well, I think it's very lacking in it's explanation of Lucene concepts and API usage. I would not send this URL to anyone as an example of integrating Hibernate and Lucene unless I felt they already understood Lucene thoroughly. You may want to start by learning more about Lucene independent of hibernate, reading though the demo application for example, before trying to bridge the two... http://lucene.apache.org/java/docs/gettingstarted.html -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]