• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with hibernate

 
Greenhorn
Posts: 14
Eclipse IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)

 
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
He's giving us the slip! Quick! Grab this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic