java.lang.NoClassDefFoundError: Could not initialize class org.com.hibernate.HibernateUtil

后端 未结 4 1343
一向
一向 2021-01-24 08:18

This is my hibernate util code

public class HibernateUtil {

private static final SessionFactory sessionFactory = buildSessionFactory();

private static SessionF         


        
4条回答
  •  迷失自我
    2021-01-24 08:52

    If someone is facing the same problem who are using Glassfish server you have to do the following,

    1. Go your Glassfish installation path and add your database's jdbc driver under the path glassfish/domains/domain1/lib/

    2. Restart your Glassfish server.

提交回复
热议问题