This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with hibernate

 
bee fouda
Greenhorn
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bee fouda
Greenhorn
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look at lines 90 , 91 in java bean. there's a null pointer exception.
 
bee fouda
Greenhorn
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so with how should i change it ??
because this is the first time i saw this just with the hibernate4
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just noticed, its incorrect method usage. Check the API docs for correct method definition here.
 
bee fouda
Greenhorn
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even i tried to change the data base from postgreSQL tp MySQL
but i still faced the same problem
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic