We're updating the issue view to help you get more done.Learn more

Invalid project slug in url causes a HibernateException

When the user specifies an invalid project path in the url, the iteration is attempted to be resolved on load on an invalid HProject.

Found via error logs.

req.requestURI: /iteration/view/wfg_0ad%20%20/A16

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 org.hibernate.HibernateException: Null value(s) passed to lookup by non-nullable natural-id at org.hibernate.persister.entity.AbstractEntityPersister.determinePkByNaturalIdQuery(AbstractEntityPersister.java:5126) at org.hibernate.persister.entity.AbstractEntityPersister.loadEntityIdByNaturalId(AbstractEntityPersister.java:5055) at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.loadFromDatasource(DefaultResolveNaturalIdEventListener.java:116) at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.resolveNaturalId(DefaultResolveNaturalIdEventListener.java:83) at org.hibernate.event.internal.DefaultResolveNaturalIdEventListener.onResolveNaturalId(DefaultResolveNaturalIdEventListener.java:40) at org.hibernate.internal.SessionImpl.fireResolveNaturalId(SessionImpl.java:1151) at org.hibernate.internal.SessionImpl.access$2700(SessionImpl.java:167) at org.hibernate.internal.SessionImpl$BaseNaturalIdLoadAccessImpl.resolveNaturalId(SessionImpl.java:2942) at org.hibernate.internal.SessionImpl$NaturalIdLoadAccessImpl.load(SessionImpl.java:3058) at org.zanata.action.VersionHome.loadInstance(VersionHome.java:269) at org.zanata.action.VersionHome$Proxy$_$$_WeldSubclass.loadInstance(Unknown Source) at org.zanata.action.VersionHome.loadInstance(VersionHome.java:82) at org.zanata.action.VersionHome$Proxy$_$$_WeldSubclass.loadInstance(Unknown Source) at org.zanata.seam.framework.EntityHome.find(EntityHome.java:292) at org.zanata.action.VersionHome$Proxy$_$$_WeldSubclass.find(Unknown Source) at org.zanata.seam.framework.EntityHome.loadInstanceByExternalId(EntityHome.java:149) at org.zanata.seam.framework.EntityHome.getInstance(EntityHome.java:120) at org.zanata.action.VersionHome$Proxy$_$$_WeldSubclass.getInstance(Unknown Source)

Status

Assignee

Damian Jansen

Reporter

Damian Jansen

Tested Version/s

None

Fix versions

Affects versions

platform-4.4.5

Priority

unspecified