I am attempting to include Hibernate v4 in my dynamic web project in Eclipse I am using Maven for Dependency I have written all the code and have created unit sections and mapping XML files but on the building project I get this error
This project was not created because its build path is incomplete Javax Class F for .name Il eluded. Fix the build path, try creating this project. MyProject
I wrote the hibernate youth class as:
import org.hibernate. SessionFactory; Import org.hibernate.boot.registry.StandardServiceRegistryBuilder; Import org.hibernate.cfg.configuration; Import org.hibernate.service.ServiceRegistry; Public Class Hibernate Youths {Private Status Session Session. Factory = buildSessionFactory (); Private Static Session Facial Fabrication (FACT) {try (sessionFactory == empty) {configuration configuration = new configuration (). Configure (Hibernate Utility Class.getResource ("/ hibernate.cfg.xml")); StandardServiceRegistryBuilder Service RegistryBuilder = New StandardServiceRegistryBuilder (); ServiceRegistryBuilder.applySettings (Configuration .getProperties ()); ServiceRegistration ServiceResearch = ServiceRajistBiller Builder (); SessionFactory = Configuration .buildSessionFactory (serviceRegistry); } Return session; } Catch (Throttle Pre) {System.err.println ("Initial Session. Factoring Failure." + East); New ExceptionInInitializerError (ex) Throw; }} Public stable session - Factory getSessionFactory () {Return Session Factory; } Public static void close () {getSessionFactory () Close (); }}
EDIT: I get this error on the GetSessionFactory method call in the shutdown method. Anyone know what the problem might be?
No comments:
Post a Comment