-->
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.  [ 4 posts ] 
Author Message
 Post subject: Manual indexing in Seam
PostPosted: Fri Feb 11, 2011 6:37 pm 
Beginner
Beginner

Joined: Tue Oct 07, 2008 7:05 pm
Posts: 27
I'm trying to do something I thought was simple: manually indexing an entity in Seam. But I keep getting the following error:

object is not an instance of declaring class

I've searched around and found out something about an "unproxy" method but I'm not sure that applies. The code looks like this:

Code:
FullTextEntityManager ftem = (FullTextEntityManager)entityManager;
MyClassToIndex myClass = ftem.find(MyClassToIndex.class, id);
ftem.index(myClass);


The exception occurs in sometime during the index method. Here is the relevant part of the stack trace:

Code:
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalArgumentException: object is not an instance of declaring class
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.jboss.seam.persistence.HibernateSessionInvocationHandler.invoke(HibernateSessionInvocationHandler.java:82)
   at $Proxy147.getActionQueue(Unknown Source)
   at org.hibernate.search.backend.impl.EventSourceTransactionContext.registerSynchronization(EventSourceTransactionContext.java:96)
   at org.hibernate.search.backend.impl.TransactionalWorker.performWork(TransactionalWorker.java:70)
   at org.hibernate.search.impl.FullTextSessionImpl.index(FullTextSessionImpl.java:186)
   at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.index(FullTextEntityManagerImpl.java:103)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.jboss.seam.persistence.EntityManagerInvocationHandler.invoke(EntityManagerInvocationHandler.java:46)
   at $Proxy82.index(Unknown Source)


Any ideas? Seems like there is a simple fix to this. I'm using Seam 2.2.1, Hibernate 3.5.4 and Hibernate Search 3.2.2-SNAPSHOT.

-JF


Top
 Profile  
 
 Post subject: Re: Manual indexing in Seam
PostPosted: Sun Feb 13, 2011 7:34 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Why Hibernate Search 3.2.2-SNAPSHOT ?
Could you please try 3.3.0.Final

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


Top
 Profile  
 
 Post subject: Re: Manual indexing in Seam
PostPosted: Mon Feb 14, 2011 4:33 pm 
Beginner
Beginner

Joined: Tue Oct 07, 2008 7:05 pm
Posts: 27
I'm was using 3.2.2-SNAPSHOT due to this issue:

viewtopic.php?f=9&t=1006616&start=0

But I switched to 3.3.0.Final (and consequently Hibernate 3.6.0.Final) and the index function seems to work.

Thanks!

-JF


Top
 Profile  
 
 Post subject: Re: Manual indexing in Seam
PostPosted: Mon Feb 14, 2011 8:11 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
any fix in old branches will also be fixed in never releases, while the opposite isn't true; so unless you got the enterprise version (which has support and backport of fixes for a loong time) you'd likely want to keep up to date with latest releases.

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