From: Max R. A. <ma...@eo...> - 2002-10-28 16:33:49
|
Just a side note: I discovered the line while pondering on another very weird and seldom situation: That hibernate had been configured with domain classes that is not assignable with the classes found when executing queries. This can occur in J2EE applications where you in certain situations are required to add your own util jars and other jars to the app-servers own classpath. What happens is that the check for assignability in getImplementors actually can fail even though the class'es names are exactly the same - but because the classloaders are different it will return false. This again results in the session.find method returning null as an result, because it could not genereate a valid query! I have the "insane" usecase at my machine, but it is hardly reproducible, but I'll try to make a small patch that will inform me if something is really goooey :) (I should be able to do it by checking wether the class'es names are equal bot not assignable - then we got a problem, maybe issue a warning ?) /max ----- Original Message ----- From: "Max Rydahl Andersen" <ma...@eo...> To: <hib...@li...> Sent: Monday, October 28, 2002 5:16 PM Subject: [Hibernate] Why this line... > In SessionFactoryImpl I found this code: > > public String[] getImplementors(Class clazz) { > > if ( classPersisters.containsKey(clazz) ) return null; > > ... > > .. > > } > > > > Why should getImplementors return null if clazz is inside the > classPersisters ? > > > > /max > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |