-->
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 with Seam
PostPosted: Tue Aug 24, 2010 2:07 pm 
Newbie

Joined: Tue Aug 24, 2010 1:49 pm
Posts: 4
Hello,

I am currently trying to get Hibernate Search running in my WAR app. In order to create the index I have the following method:
Code:
@Transactional
    public void createIndex()
    {
       log.info("creating index") ;
       
       FullTextEntityManager ftem = Search.getFullTextEntityManager(entityManager); 

       try
       {
       //   fullTextEntityManager.createIndexer().startAndWait() ;   
          ftem.createIndexer().startAndWait() ;   
       }
       catch(InterruptedException e)
       {
          log.info("interrupted exception" + e) ;
       }
       
    }


However this makes the server cough with the following error when it gets to the line involving the FullTextEntityManager:
Code:
java.lang.ClassCastException: org.jboss.seam.persistence.HibernateSessionProxy cannot be cast to org.hibernate.classic.Session
   at org.hibernate.search.impl.FullTextSessionImpl.<init>(FullTextSessionImpl.java:102)
   at org.hibernate.search.Search.getFullTextSession(Search.java:46)
   at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.getFullTextSession(FullTextEntityManagerImpl.java:69)
   at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.createIndexer(FullTextEntityManagerImpl.java:290)
   at com.maierinc.stylect.session.RecordConversationAction.createIndex(RecordConversationAction.java:96)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
etc...


I've tried on both Jboss 4.2.3 (with hibernate libraries updated) and JBoss 5.0.1. Same issue. A short blog stated that it's libraries conflict but didn't state what precise combination of libraries had worked for them.

Google didn't give up any secrets. I'm at a loss. Help would be greatly appreciated.

Thank you,
Dahn


Top
 Profile  
 
 Post subject: Re: Hibernate Search with Seam
PostPosted: Wed Aug 25, 2010 5:41 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Which versions of Seam, Hibernate Core and Search are you using?


Top
 Profile  
 
 Post subject: Re: Hibernate Search with Seam
PostPosted: Wed Aug 25, 2010 9:04 am 
Newbie

Joined: Tue Aug 24, 2010 1:49 pm
Posts: 4
Seam 2.1.2, Hibernate Core - whatever's bundled up with JBoss 5.0.1 and HSearch 3.2.1 (not working).

Then I tried with HSearch 3.1.0 and it is now working. However I've run into the UN_TOKENISED typo issue so I can't use that property with this version.

It would be great if there were a guide as to which precise versions of Hibernate, Seam and JBoss (Hibernate Core) work together (or which to replace in each framework as there are Hibernate libraries both in Seam and Jboss and now some in my app which apparently end up conflicting). The compatibility grid is not clear any longer since the new bundling of Core now includes EntityManager etc. (I'm using JPA).

Thank you for helping with this.


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.