I misssed 2 things.

1. If the class is not annotated with @NaturalIdCache, there's no problem

2. This is the relevant stacktrace:

stacktrace
java.lang.NullPointerException
	at org.hibernate.cache.ehcache.internal.strategy.AbstractEhcacheAccessStrategy.putFromLoad(AbstractEhcacheAccessStrategy.java:66)
	at org.hibernate.cache.ehcache.internal.nonstop.NonstopAwareNaturalIdRegionAccessStrategy.putFromLoad(NonstopAwareNaturalIdRegionAccessStrategy.java:207)
	at org.hibernate.engine.internal.StatefulPersistenceContext$1.managedSharedCacheEntries(StatefulPersistenceContext.java:1873)
	at org.hibernate.engine.internal.StatefulPersistenceContext$1.cacheNaturalIdCrossReferenceFromLoad(StatefulPersistenceContext.java:1810)
	at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.loadFromDatasource(DefaultResolveNaturalIdEventListener.java:145)
	at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.resolveNaturalId(DefaultResolveNaturalIdEventListener.java:95)
	at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.onResolveNaturalId(DefaultResolveNaturalIdEventListener.java:61)
	at org.hibernate.internal.SessionImpl.fireResolveNaturalId(SessionImpl.java:1083)
	at org.hibernate.internal.SessionImpl.access$2100(SessionImpl.java:175)
	at org.hibernate.internal.SessionImpl$BaseNaturalIdLoadAccessImpl.resolveNaturalId(SessionImpl.java:2476)
	at org.hibernate.internal.SessionImpl$SimpleNaturalIdLoadAccessImpl.load(SessionImpl.java:2645)
	at cl.kiwox.entel.qrlinkssite.dao.hbn.HbnPageDao.getByName(HbnPageDao.java:24)
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