Alguém pode me ajudar com esse erro que esta dando...
import hibernate.Session;
import hibernate.SessionFactory;
import hibernate.cfg.Configuration;
public class HibernateUtility {
private static SessionFactory factory;
static {
//Bloco estático que inicializa o Hibernate
try {
factory = new Configuration().configure().buildSessionFactory();\\***ERRO***
} catch (Exception e) {
e.printStackTrace();
factory = null;
}
}
public static Session getSession() {
//Retorna a sessão aberta
return factory.openSession();
}
}
O erro é"The project was not built since its build path is incomplete. Cannot find the class file for hiber.src.org.hibernate.cfg.Configuration. Fix the build path then try building this project" e "The type hiber.src.org.hibernate.cfg.Configuration cannot be resolved. It is indirectly referenced from required .class files".
public Configuration configure() throws HibernateException {
configure( "/hibernate.cfg.xml" );
return this;
public Configuration() {
this( new SettingsFactory() );
}
Estou precisando muito resolver esse problema.
Acho que essa será a ultima difilculade que eu encontrarei no Hibernate...
:roll: