Tuesday, 18 August 2015

Exception in thread "main" org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection available

Such exception occurs usually in cases like if  we missed the configure() method while creating Configuration Object for Hibernate system followed by  the SessionFactory object.
one of the simplest way to remove such exception is simply by adding configure() method

here is an example of such case

   the easy to solve this problem is simply replace this code by
Configuration config=new Configuratio().configure();
or
Configuration config=new Configuration();
config.configure();

hope it solved your problem


thanks and regards 
ErrorsException Team





0 comments:

Post a Comment