-->
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 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 3:32 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi,

i just upgrade lucene 3.0.3, hibernate 3.6.3/3.6.2 final (both not work) and hibernate search 3.3.0 final to the latest 3.4.0 RC2.

without any code change, i assume it can run without any problem.

however, when my code update an entity with collection (@indexEmbedded) it throws NullPointerException:

Code:
java.lang.NullPointerException
   org.hibernate.search.event.FullTextIndexEventListener.processCollectionEvent(FullTextIndexEventListener.java:242)
   org.hibernate.search.event.FullTextIndexEventListener.onPostRemoveCollection(FullTextIndexEventListener.java:226)
   org.hibernate.action.CollectionRemoveAction.postRemove(CollectionRemoveAction.java:146)
   org.hibernate.action.CollectionRemoveAction.execute(CollectionRemoveAction.java:119)
   org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
   org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
   org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:186)
   org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
   org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
   org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
   org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
   org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
   org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656)
   org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
   org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
   org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
   org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
   org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   $Proxy38.update(Unknown Source)
..... //other code omit


I using debugger to trace, it find out that is cause by the event object, when event object pass to onPostRemoveCollection method, the event object's collection is null, hence when running processCollectionEvent (line 242 event.getCollection() ) it throw null pointer exception.

my object is something like this :

Object A {
@indexEmbedded
ObjectB B = ...
}

Object B {
Set<ObjectC> set..
}

is that a bug, or do i missing some configuration setting (my configuration is not changing, still using same as 3.3.0)

any idea ?

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: hibernate search 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 7:24 am 
Beginner
Beginner

Joined: Mon Apr 11, 2011 7:56 am
Posts: 38
Did you upgrade lucene to 3.1.0 ?


Top
 Profile  
 
 Post subject: Re: hibernate search 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 10:02 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
yes. i think can;t run if u not using lucene 3.1.

i think the problem occurs before lucene index the field (HS can;t find the collection in the event object since it is null).

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: hibernate search 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 10:03 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi kiwionly.
thank you for the report, that's indeed a bug; just in time to be fixed before the release today (I hope still on time..).

and also, Elmer is right with this version you have to update Lucene to 3.1 as well.

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


Top
 Profile  
 
 Post subject: Re: hibernate search 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 10:34 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
ok cool ! then i wait for new release instead :)

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: hibernate search 3.4.0 RC2 issue (null pointer when index)
PostPosted: Mon Apr 18, 2011 1:55 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Should be solved:
http://in.relation.to/Bloggers/HibernateSearch34FacetingPerfAndMore

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