-->
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.  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Null pointer Exception if result not found
PostPosted: Wed Apr 20, 2011 1:19 pm 
Beginner
Beginner

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

I just migrate to new hibernate search 3.4.0 with lucene 3.1.0.

once again, without any code change, i just upgrade the library.

however, I had encounter this
Code:
java.lang.NullPointerException
    org.hibernate.search.filter.AndDocIdSet.findFirstTargetPosition(AndDocIdSet.java:144)
    org.hibernate.search.filter.AndDocIdSet.makeDocIdSetOnAgreedBits(AndDocIdSet.java:89)
    org.hibernate.search.filter.AndDocIdSet.buildBitSet(AndDocIdSet.java:81)
    org.hibernate.search.filter.AndDocIdSet.iterator(AndDocIdSet.java:60)
    org.apache.lucene.search.IndexSearcher.searchWithFilter(IndexSearcher.java:550)
    org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:525)
    org.hibernate.search.query.engine.impl.QueryHits.updateTopDocs(QueryHits.java:219)
    org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:127)
    org.hibernate.search.query.engine.impl.HSQueryImpl.getQueryHits(HSQueryImpl.java:419)
    org.hibernate.search.query.engine.impl.HSQueryImpl.queryEntityInfos(HSQueryImpl.java:222)
    org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:206)
    com.example.dao.impl.DaoImpl.search(Unknown Source)
    ....


with version 3.3.0 final, everthing is fine. This problem occurs only when the result is not found.

any idea ?

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Wed Apr 20, 2011 4:39 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi kiwi,
thank you, that's a bug. Could you please report it on JIRA with the stacktrace and assign it to me? I'm already making a fix.
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Wed Apr 20, 2011 5:39 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
sorry, I created it already:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-741

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Wed Apr 20, 2011 11:05 pm 
Beginner
Beginner

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

just wondering will it solving in next minor version or any snapshot release instead of version 3.5 so I no need switch back to version 3.3.0 final. (so I can use the new features from 3.4.0 immediately :) )

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Thu Apr 21, 2011 6:54 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi, just found out another possible bugs could be related to filters

I had a method which return the top ranking of an item (filter below):

Code:
Filter filter = NumericRangeFilter.newIntRange("statistic.usersRecommendCount", 0, null, false, false);


In this case, it return an empty size list instead of throw Null Pointer Exception.

however, when I run on Hibernate search 3.3.0 final with lucene 3.03, everything is ok.

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Thu Apr 21, 2011 9:44 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
I didn't understand what you expect, and what's different.
Is the problem related to a single filter, or in the way we combine them?
I'm afraid that if it's about a single filter, then it's likely a Lucene bug as we don't mess directly with the results, but I'd still be interested to explore this to see if we can workaround it so that people can perform smooth upgrades, or in worst case document changes.

Could you please create a unit test?

Feel free to create an issue on JIRA and attach it as a patch to the project.

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Thu Apr 21, 2011 2:26 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
just wondering will it solving in next minor version or any snapshot release instead of version 3.5 so I no need switch back to version 3.3.0 final. (so I can use the new features from 3.4.0 immediately :) )

The fix was merged in master and I just deployed a new snapshot, so in this moment version 3.5.0-SNAPSHOT is as 3.4.0.Final but including the fix (though be careful it will likely change more soon).
I've proposed a .1 release to include this, will be decided at next meeting.

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Fri Apr 22, 2011 12:28 am 
Beginner
Beginner

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

sorry for confuse.. about the filters issue, i think this filters issue possible due to this bugs too. anyway, i will check again after the bug is solved.

thx a lot :)

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Fri Apr 22, 2011 3:53 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
the issue was solved, you can check it. See my previous post about 3.5.0-SNAPSHOT

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Fri Apr 22, 2011 4:41 am 
Beginner
Beginner

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

just download the snapshot (hibernate-search-3.5.0-20110421.172737-1.jar) and test, it work now.

thx :)

kiwi

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Fri Apr 22, 2011 5:56 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
you're welcome, thank you for the great feedback!

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Fri Jul 15, 2011 5:02 pm 
Newbie

Joined: Fri Jul 15, 2011 4:58 pm
Posts: 1
s.grinovero wrote:
Quote:
just wondering will it solving in next minor version or any snapshot release instead of version 3.5 so I no need switch back to version 3.3.0 final. (so I can use the new features from 3.4.0 immediately :) )

The fix was merged in master and I just deployed a new snapshot, so in this moment version 3.5.0-SNAPSHOT is as 3.4.0.Final but including the fix (though be careful it will likely change more soon).
I've proposed a .1 release to include this, will be decided at next meeting.


Hi Sanne, is there gonna be a 3.4.1 version with this fix?
I'm using the 3.5.0 snapshot, but I would feel more comfortable using a final version.

Thanks
Enrique


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Sat Jul 16, 2011 12:00 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
sorry I almost forgot about this NPE, we're focusing on Hibernate Search 4.0 and I'm not aware of concrete plans for a 3.4.1.
Good you asked, I raised the question on the mailing list: feel free to follow and join the discussion.

http://lists.jboss.org/pipermail/hibernate-dev/2011-July/006772.html

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


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Mon Jul 18, 2011 7:37 am 
Newbie

Joined: Mon Jul 18, 2011 7:28 am
Posts: 2
Hi,

Jira issue HSEARCH-741 is marked as fixed, but the affected version is 4.0.0.Alpha1
Is there any way to fix it for 3.4.0.Final release ? Since there are no options for me to switch to 3.3.0.Final and Lucene 3.0.3


Top
 Profile  
 
 Post subject: Re: Null pointer Exception if result not found
PostPosted: Mon Jul 18, 2011 7:39 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
Jira issue HSEARCH-741 is marked as fixed, but the affected version is 4.0.0.Alpha1
Is there any way to fix it for 3.4.0.Final release ? Since there are no options for me to switch to 3.3.0.Final and Lucene 3.0.3

Not for 3.4.0.Final, but a 3.4.1.Final should come soon and include this fix.

_________________
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.  [ 19 posts ]  Go to page 1, 2  Next

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.