I have a class that subclasses HibernateDaoSupport. When the following fragment inside that class is called and there is no object with the given id, no Exceptions are thrown.

Code:
public Object (Class class, Integer id) {
        try {
            return getHibernateTemplate().load(clazz, id);
        }
        catch (RuntimeException e) {
            if (e.getCause() != null && e.getCause().getClass().equals(ObjectNotFoundException.class)) {
                return null;
            }

            throw e;
        }
}
Later, when I try to call setDate() on the returned Object, I get something like this:

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.SomeObject#78]
at org.hibernate.ObjectNotFoundException.throwIfNull( ObjectNotFoundException.java:27)
at org.hibernate.event.def.DefaultLoadEventListener.l oad(DefaultLoadEventListener.java:118)
at org.hibernate.event.def.DefaultLoadEventListener.o nLoad(DefaultLoadEventListener.java:75)
at org.hibernate.impl.SessionImpl.immediateLoad(Sessi onImpl.java:639)
at org.hibernate.proxy.AbstractLazyInitializer.initia lize(AbstractLazyInitializer.java:59)
at org.hibernate.proxy.AbstractLazyInitializer.getImp lementation(AbstractLazyInitializer.java:84)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept (CGLIBLazyInitializer.java:134)
at com.SomeObject$$EnhancerByCGLIB$$4ed47797.setDate( <generated>)
Any ideas?

van