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