NullPointerException on constraint

I have an entity named Application and it has its own property Entity named Agent.

@ManyToOne(fetch = FetchType.LAZY)
@Lookup(type = LookupType.DROPDOWN, actions = {"lookup"})
@JoinColumn(name = "AGENT_ID")
protected Agents agent;

On adding a Access-Group for browse-view from Administration I am getting error like following:

java.lang.NullPointerException: null
        at com.haulmont.cuba.core.sys.PersistenceSecurityImpl$EntityId.hashCode(PersistenceSecurityImpl.java:376) ~[cuba-core-6.8.1.jar:6.8.1]

if I remove access-group constraint, everything is fine

Hi,

Could attach the full stacktrace or log file?