I have a problem with NamedNativeQuery calling. I try to call an Oracle package procedure what has no return value and out parameter.
I wrote an Entity annotated class, what I added to my config, but when I try to use the query then I got an error:
"Named query not known. KarSet"

Here is the class definition:

package com.ath.db;
import java.io.Serializable;
import javax.persistence.Id;
import org.hibernate.annotations.Entity;
import org.hibernate.annotations.NamedNativeQuery;

@NamedNativeQuery(name = "KarSet", query = "call flexutil.pkg_cl_util.set_kar_udf(?, ?)", callable = true, resultClass=AthKarSet.class)
public class AthKarSet implements Serializable
private static final long serialVersionUID = 512975560291089577L;

public long getCallId()
return 1L;


And the calling:

Query lQuery = lSess.getNamedQuery("KarSet");
lQuery.setParameter(0, lData.getAthLoanId());
lQuery.setParameter(1, lData.getAthKarAct());

The package header:
procedure set_kar_udf(p_hfe_id varchar2, p_value varchar2);

Do you have any idea, what is the problem?

Thank you!