• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

program running properly but values are not reflecting in database

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i have run a hibernate example that has been given in rose india.com

programm is running perffectly with out any errors
in console its showing as

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Inserting Record
Done
Hibernate: insert into CONTACT (FIRSTNAME, LASTNAME, EMAIL, ID) values (?, ?, ?, ?)

but nothing inserting in database and iam using mysql database.
 
author and cow tipper
Posts: 5006
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy Greenhorn! Welcome to the JavaRanch.

Oh, and I updated your subject line to use full words rather than abbreviations. That should help get better responses here at the ranch.

And ksrk, could you please check your private messages for a tiny administrative matter? Thanks.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's really, really difficult to debug code when there's no code, though. Please see the FAQ entries ItDoesntWorkIsUseless and TellTheDetails. Thanks!
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have any primary key on this table? Doesn't look like.

Also did you make sure that you are actually sending values for the first name etc.. ?

Also double check your hibernate configuration properties for auto commit.

Sarma
 
ksrk mahidhar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks i got solution for this
priviously i didn't added transaction in that
like
Transaction tx = session.beginTransaction();
and
tx.commit();--this shoud be after session.save
and problem is solved
reply
    Bookmark Topic Watch Topic
  • New Topic