[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1866) NullPointerException in org.hibernate.util.ComparableComparator

Brian Stansberry (JIRA) noreply at atlassian.com
Tue Mar 6 17:40:33 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1866?page=all ]

Brian Stansberry updated HHH-1866:
----------------------------------

    Attachment: OptimisticTreeCache.patch

Attached is a patch to the 3.2 branch version of OptimisticTreeCache that avoids the NPE. A JBoss EJB3 user using org.jboss.ejb3.entity.OptimisticJBCCache with this change in it reports that their issues with null DataVersions went away. (OptimisticJBCCache is based on OptimisticTreeCache and is identical in this section of the code.)

> NullPointerException in org.hibernate.util.ComparableComparator
> ---------------------------------------------------------------
>
>          Key: HHH-1866
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1866
>      Project: Hibernate3
>         Type: Bug

>     Versions: 3.2.0.cr2
>  Environment: - Hibernate 3.2.0 CR2
> - Spring 1.2.5
> - JBoss Cache  1.4
> - Oracle 9i
> - Windows and Linux
>     Reporter: Eduard Hildebrandt
>  Attachments: OptimisticTreeCache.patch
>
>
> I think that org.hibernate.util.ComparableComparator or OptimisticTreeCache.DataVersionAdapter  has a bug.
> "return ((Comparable) x).compareTo(y);" throws a NullPointerException if x is a null pointer.
> org.hibernate.util.ComparableComparator. compare(..) is called from OptimisticTreeCache.DataVersionAdapter in line "return versionComparator.compare( previousVersion, other ) > 1;".
> We get this NullPointerExption if we use Hibernate with org.hibernate.cache.OptimisticTreeCacheProvider which causes an org.springframework.transaction.UnexpectedRollbackException. 
> Greetings from Germany!

-- 
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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list