Guillaume Smet commented on Bug HHH-7821

We just found another problem related to this in one of our applications. The stacktrace is slightly different:

java.lang.NullPointerException
     at org.hibernate.type.descriptor.java.AbstractTypeDescriptor.extractHashCode(AbstractTypeDescriptor.java:88)
     at org.hibernate.type.AbstractStandardBasicType.getHashCode(AbstractStandardBasicType.java:210)
     at org.hibernate.type.AbstractStandardBasicType.getHashCode(AbstractStandardBasicType.java:214)
     at org.hibernate.engine.spi.CollectionKey.generateHashCode(CollectionKey.java:86)
     at org.hibernate.engine.spi.CollectionKey.<init>(CollectionKey.java:74)
     at org.hibernate.engine.spi.CollectionKey.<init>(CollectionKey.java:60)
     at org.hibernate.engine.loading.internal.CollectionLoadContext.getLoadingCollection(CollectionLoadContext.java:111)
     at org.hibernate.loader.Loader.handleEmptyCollections(Loader.java:1267)
     at org.hibernate.loader.Loader.doQuery(Loader.java:868)
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:293)
     at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:263)
     at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2157)
     at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:80)
     at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:678)
     at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:80)
     at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1804)
     at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:549)
     at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:234)
     at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:545)
     at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:124)
     at org.hibernate.collection.internal.PersistentBag.toArray(PersistentBag.java:274)
     at java.util.Collections.sort(Collections.java:116)

One of my coworker is going to work on building a self contained test case for this case, too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira