org.hibernate.exception.genericjdbception:无法加载实体:[com.cartif.database.Role#Project]

org.hibernate.exception.genericjdbception:无法加载实体:[com.cartif.database.Role#Project],hibernate,jakarta-ee,Hibernate,Jakarta Ee,我正在使用Hibernate进行开发。因此,当我想加载一个事件时,我会得到如下错误: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.cartif.database.Role#Project] 我的hibernate映射文件是: <hibernate-mapping> <class name="com.cartif.database.Role" table="Role"

我正在使用Hibernate进行开发。因此,当我想加载一个事件时,我会得到如下错误:

org.hibernate.exception.GenericJDBCException: could not load an entity: [com.cartif.database.Role#Project]
我的hibernate映射文件是:

<hibernate-mapping> 
<class name="com.cartif.database.Role" table="Role">
    <id column="name" name="name" type="java.lang.String"/>
    <property column="permission" generated="never" lazy="false" name="permission" type="java.lang.Integer"/>
</class>
</hibernate-mapping>
我已经检查了包装和表名,但它们都可以!有什么问题吗

谢谢


问候

对不起,我连接的用户没有权限。我将授权添加到数据库中的用户,它将运行

(Role)DatabaseManager.loadObject(Role.class, loadUser(login).getRole())

public static Object loadObject(Class o, String id){
    if(session == null) createSession();
    return session.get(o, id);
}