[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5266?page=c...
]
Strong Liu commented on HHH-5266:
---------------------------------
yeah, thanks Jan for reporting this, for further investing this issue, would you please
attach a runnable test case?
NullPointer in toString of PersistentBag
----------------------------------------
Key: HHH-5266
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5266
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Reporter: Jan Stolze
We have created an interceptor which keeps track of changes during a running transaction
so in case of a rollback we can log which changes where issued before the rollback is
performed. Now we sometimes see in case a rollback is issued the following stacktrace:
exception in interceptor afterTransactionCompletion()
java.lang.NullPointerException
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:116)
at
org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:71)
at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744)
at
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366)
at
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
at org.hibernate.collection.PersistentBag.toString(PersistentBag.java:506)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at
gti.db.DbRollbackLogginInterceptor$LogEntry.toString(DbRollbackLogginInterceptor.java:246)
at java.lang.String.valueOf(String.java:2826)
at java.lang.StringBuilder.append(StringBuilder.java:115)
at gti.db.DbRollbackLogginInterceptor.logRollback(DbRollbackLogginInterceptor.java:109)
at
gti.db.DbRollbackLogginInterceptor.afterTransactionCompletion(DbRollbackLogginInterceptor.java:70)
at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:455)
at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:252)
at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:208)
at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:85)
We do not have (at this moment) a clear overview of what has happend and what the exact
conditions are for this NPE to occur, but think it is still important enough to report.
--
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