-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate Search Mass Indexing is not working.
PostPosted: Wed Feb 01, 2012 8:50 am 
Newbie

Joined: Wed Feb 01, 2012 8:31 am
Posts: 5
Hi,
I have created an application with spring 3 and hibernate 3.6. I am using hibernate search feature. I wrote a a piece of code for mass indexing of data. I have just followed the documentation. When I invoke this code, data not being indexed and it is taking a lot of time. Its showing write.lock in indexed data folder. How to solve this issue?

Thanks,
Ramesh


Top
 Profile  
 
 Post subject: Re: Hibernate Search Mass Indexing is not working.
PostPosted: Wed Feb 01, 2012 2:20 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
do you see some error in the logs? How do you know it's not busy working, do you have a progress monitor enabled?
If you have a big set of data to index it might take a long time.

If you don't see anything else suspicious, please post a thread dump so I can give you some hints on what it's doing;
Also you should post the exact versions of Hibernate Core and Hibernate Search you're using.

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search Mass Indexing is not working.
PostPosted: Thu Feb 02, 2012 12:38 am 
Newbie

Joined: Wed Feb 01, 2012 8:31 am
Posts: 5
Hi,
I am using hibernate core 3.6.3.Final. I haven't enabled progress monitor. I am using Spring 3.0.5, JPA and Hibernate. While saving new entities, indexing works fine. I can browse using LUKE. Only issue is with reindexing. I am not getting any error logs. Following is the piece of code using for reindexing.
try{
FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(entityManager);
fullTextEntityManager.createIndexer().startAndWait();
}catch(InterruptedException e){
e.printStackTrace();
}

And i have only few data in the database. I am using mysql.

Thanks,
Ramesh


Top
 Profile  
 
 Post subject: Re: Hibernate Search Mass Indexing is not working.
PostPosted: Thu Feb 02, 2012 5:41 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Thanks. What version of Hibernate Search? Could you please paste a threaddump of the JVM when you're waiting for the indexing to finish?

Are you using any connection pools to connect to MySQL? Try making the maximum pool size significantly larger.

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search Mass Indexing is not working.
PostPosted: Fri Feb 03, 2012 5:07 am 
Newbie

Joined: Wed Feb 01, 2012 8:31 am
Posts: 5
Hi,
I am getting error log :). I am using datasource for mysql connection. I have increased connections in both mysql and datasource. Mysql connection is greater that datasource connection(Its 150 and 200).
Here is the error log,
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114) ~[tomcat-dbcp.jar:6.0.32]
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[tomcat-dbcp.jar:6.0.32]
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:71) ~[hibernate-entitymanager-3.6.7.Final.jar:3.6.7.Final]
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81) [hibernate-core-3.6.3.Final.jar:3.6.3.Final]
at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:98) [hibernate-search-3.4.1.Final.jar:3.4.1.Final]
at org.hibernate.search.batchindexing.OptionallyWrapInJTATransaction.run(OptionallyWrapInJTATransaction.java:107) [hibernate-search-3.4.1.Final.jar:3.4.1.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_17]
at java.lang.Thread.run(Thread.java:637) [na:1.6.0_17]
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1144) ~[tomcat-dbcp.jar:6.0.32]
at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) ~[tomcat-dbcp.jar:6.0.32]
... 11 common frames omitted


I have even used autoConnect=true for jdbc url.

Thanks,
Ramesh K


Top
 Profile  
 
 Post subject: Re: Hibernate Search Mass Indexing is not working.
PostPosted: Fri Feb 03, 2012 9:20 am 
Newbie

Joined: Wed Feb 01, 2012 8:31 am
Posts: 5
Hi,
Thanks Sanne . Issue is fixed :) Datasource connection limit was the problem. Now it started reindexing. But one other issue is getting now. I have 9 classes to index, except one everything is reindexing. I am not getting any error log. What could be the problem?

Thanks,
Ramesh


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