[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2624?page=c...
]
Robert La Ferla commented on HHH-2624:
--------------------------------------
I'm seeing this too with Grails 1.1.1. However, note the different line # on
AbstractEntityPersister.java.
java.lang.NullPointerException
at
org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1672)
at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:641)
at org.hibernate.type.EntityType.resolve(EntityType.java:415)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
at org.hibernate.loader.Loader.doQuery(Loader.java:752)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.loadCollection(Loader.java:2015)
at
org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:59)
at
org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1743)
at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366)
at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:186)
at
org.codehaus.groovy.grails.validation.GrailsDomainClassValidator.cascadeValidationToMany(GrailsDomainClassValidator.java:177)
at
org.codehaus.groovy.grails.validation.GrailsDomainClassValidator.cascadeToAssociativeProperty(GrailsDomainClassValidator.java:161)
at
org.codehaus.groovy.grails.validation.GrailsDomainClassValidator.validate(GrailsDomainClassValidator.java:104)
at
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractSavePersistentMethod.doInvokeInternal(AbstractSavePersistentMethod.java:87)
at
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod.invoke(AbstractDynamicPersistentMethod.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
NullPointerException when Query.list()
--------------------------------------
Key: HHH-2624
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2624
Project: Hibernate Core
Issue Type: Bug
Components: core
Environment: MySQL database
Reporter: Eddie Man
Priority: Critical
Attachments: src.zip
The following exception was thrown when I calling Query.list():
Exception in thread "main" java.lang.NullPointerException
at
org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1641)
at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:608)
at org.hibernate.type.EntityType.resolve(EntityType.java:382)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
Reference issue :
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-48
Steps for reproduce the problem
==================
1. Unzip the attached file.
2. Execute the "schema.ddl" to create the tables.
3. Execute the "data.ddl" to insert the simple records.
4. Compile the src, and run the Main class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira