• 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

Exception in thread "main" java.lang.IllegalStateException: Could not locate SessionFactory in JNDI

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends, I am new to Hibernate and while coding data retrieval from MySql (ClassicModels schema) database in main() I keep running into "Exception in thread "main" java.lang.IllegalStateException: Could not locate SessionFactory in JNDI". Searched for resolution in many many forums but couldn't zero in on a fix to this issue (perhaps my inexperience blinded me). Apologize for reposting if this has been addressed earlier but please help with a resolution. Please let me know any additional tech detail if required. Thanks in advance.. and sorry the message is long!

Logger: SLF4J 1.7.5
Hibernate version: 4.2.6
Jdk: 1.7.0_45
MySql jdbc connector: 5.1.26
OS: Mac OSX, Mavericks
No properties setup.
Genrated domain code using Hibernate perspective's code gen functionality.

Hibernate Configuration:

HibernateUtil

Main method:

Exception:
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic