-->
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: ObjectNotFoundException: No row with the given identifier ex
PostPosted: Mon Jul 05, 2010 7:41 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
Hi,

i created an index with round about 1 million entries with the massindexer. Now i perform a query on that, and i get the following exception:

Code:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [some.package.path.to.an.Object#44151]
   at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:447)
   at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:233)
   at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:269)
   at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
   at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1080)
   at org.hibernate.impl.SessionImpl.load(SessionImpl.java:977)
   at org.hibernate.impl.SessionImpl.load(SessionImpl.java:970)
   at org.hibernate.search.engine.ObjectLoaderHelper.returnAlreadyLoadedObjectsInCorrectOrder(ObjectLoaderHelper.java:101)
   at org.hibernate.search.engine.MultiClassesQueryLoader.load(MultiClassesQueryLoader.java:124)
   at org.hibernate.search.query.FullTextQueryImpl.list(FullTextQueryImpl.java:339)
        ...


If i perform the same query with luke on the same index, i get my results presented. The query is build and performed like this:
Code:
FullTextQuery ftQuery = fSession.createFullTextQuery(bq);
ftQuery.setMaxResults(1000);
List<Object> results = null;
try{
   results = ftQuery.list();
} catch (ObjectNotFoundException onf){
   myLogger.error("some error", onf);
}

(with bq being a stepwise build boolean query, with a lot of fields)

edit: btw, index is build this way (done within a thread for each class to index):
Code:
public void run(){
                MassIndexer mi = fSession.createIndexer(indexClass);
      mi.threadsToLoadObjects(5);
      mi.batchSizeToLoadObjects(25);
      mi.cacheMode(CacheMode.IGNORE);
      mi.threadsForSubsequentFetching(20);
      try{
         mi.startAndWait();
      } catch (InterruptedException ie){
         myLogger.error("some error appeared", ie);
      }
      
   }


Could anybody tell me, why this happens?


Top
 Profile  
 
 Post subject: Re: ObjectNotFoundException: No row with the given identifier ex
PostPosted: Mon Jul 05, 2010 7:59 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
ok, problem solved. I'm an idiot. Keep your hibernate config files as clean as possible, forgot to uncomment one of several connection.url propertys, so the one i needed was overwritten, so that i use the wrong db. works now. :)


Top
 Profile  
 
 Post subject: Re: ObjectNotFoundException: No row with the given identifier ex
PostPosted: Mon Jul 05, 2010 6:07 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
edit: btw, index is build this way (done within a thread for each class to index):

that's not needed, use the .createIndexer(class1,class2,class3); it will behave the same but sharing the resources which won't hinder performance.

Quote:
ok, problem solved.

good :)

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