-->
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: Seam 2.1.1.GA+HibernateSearch JBOSS 5.1.0ClassCastException.
PostPosted: Fri Jul 09, 2010 8:22 pm 
Newbie

Joined: Fri Jul 09, 2010 7:52 pm
Posts: 4
Code:
@Name("org.translator.search.IndexActivator")
@AutoCreate
@Scope(ScopeType.APPLICATION)
public class IndexHelper {

    @Logger
    private Log log;
     

    @Observer(App.INIT_SUCCESS)
    @Asynchronous
    public void checkIndexOnStartup() {
       
        FullTextEntityManager ftEm = Search.getFullTextEntityManager(entityManager);
           
        SearchFactory searchFactory = ftEm.getSearchFactory();
       
        ReaderProvider readerProvider = searchFactory.getReaderProvider();

......does not get here


so if I try to get ftEm.getSearchFactory(); the exception is thrown
Code:
RROR [AsynchronousExceptionHandler] Exeception thrown whilst executing asynchronous call
java.lang.ClassCastException: org.jboss.seam.persistence.HibernateSessionProxy
at org.hibernate.search.impl.FullTextSessionImpl.<init>(FullTextSessionImpl.java:102)






if I try to inject FullTextEntityManager entitymanager I get

Code:
19:48:32,468 ERROR [AsynchronousExceptionHandler] Exeception thrown whilst executing asynchronous call
java.lang.IllegalArgumentException: could not set field value: org.translator.search.IndexActivator.entityManager
        at org.jboss.seam.Component.setFieldValue(Component.java:1894)
        at org.jboss.seam.Component.access$600(Component.java:127)
        at org.jboss.seam.Component$BijectedField.set(Component.java:2902)
        at org.jboss.seam.Component.injectAttributes(Component.java:1703)
        at org.jboss.seam.Component.inject(Component.java:1521)
        at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)

I am using hibernate search 3.2.0, hibernate-commons-annotations-3.2.0.Final.jar JBOSS 5.1.0


I would appreciate any help.


Top
 Profile  
 
 Post subject: Re: Seam 2.1.1.GA+HibernateSearch JBOSS 5.1.0ClassCastException.
PostPosted: Fri Jul 09, 2010 9:55 pm 
Newbie

Joined: Fri Jul 09, 2010 7:52 pm
Posts: 4
Ok I 've changed seam to 2.2.0 and it seems to work.


Top
 Profile  
 
 Post subject: Re: Seam 2.1.1.GA+HibernateSearch JBOSS 5.1.0ClassCastException.
PostPosted: Mon Jul 12, 2010 9:16 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Ok I 've changed seam to 2.2.0 and it seems to work.

right, JBoss5 requires Seam 2.2

_________________
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.  [ 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.