This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes problem with hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem with hibernate" Watch "problem with hibernate" New topic
Author

problem with hibernate

bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

when i ran the project without including the hibernate configuration and mapping files , the project works correctly
but if i added these files using the "hibernate synchronizer" a problem will be shown
please i really need your help

by the way i work with : eclipse juno , tomcat as server , jsf2 (primefaces) , hibernate 4
and the database : postgreSQL

javax.servlet.ServletException: org/hibernate/HibernateException
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

This is a very generic and top level exception. I worked with primefaces and I was really bothered for for there were no traces or exception message. You can either add a log4j debugger or use the primefaces source code to get more detailed exception message.


Thanks,
Tushar (SCJP 1.5)
bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

this is my java bean




and this my html file




and i still get the same exception



please i really need your help
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

look at lines 90 , 91 in java bean. there's a null pointer exception.
bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

so with how should i change it ??
because this is the first time i saw this just with the hibernate4
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

just noticed, its incorrect method usage. Check the API docs for correct method definition here.
bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

i tried another mini project

this is my bean





and this is my html file




but i get a an empty datatable , i don't know the cause
please can anyone help me !
thanks



bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

even i tried to change the data base from postgreSQL tp MySQL
but i still faced the same problem
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

in this mini project, put a breakpoint at etudiant.getEtudiantList and check if the function is getting called. If yes, check if the list contains values.
bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

when i add the main to check if the variable of the fonction have value
i had the values in the console but when i want to send it to the html file
i figure that the datatable still be shown without records
i didn't get what it the real problem ???

thks T Mishra for your help every time
T Mishra
Ranch Hand

Joined: Apr 04, 2006
Posts: 108

let's use the basic datatable of primefaces as shown here.
Since the values aren't null, lets try using instead <p:dataTable> of <h:dataTable>
bee fouda
Greenhorn

Joined: Mar 20, 2013
Posts: 14

thanks a lot
finally i resolved my problem
i put the jar in the library but not in the lib
when i put it in the lib the project worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with hibernate
 
Similar Threads
hibernate error: Could not parse configuration: hibernate.cfg.xml
Trouble setting up Hibernate with Struts in Eclipse
Hibernate Bind entity classes more than once .
Unable to locate HQL query plan in cache; generating (from Event)
Use of Hibernate