Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoInitialContextException

 
Hamzah khammash
Greenhorn
Posts: 23
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
i have face a strange thing , i created a JPA project with hibernate annotations implementation ,when i run the application it give me this error


and then get the data i want so what is happened here ?

here is the persistence.xml which is inside src/META-INF folder :



and Hibernate.cfg.xml :

I faced this problem before it caused by persistence not correctly named and didn't give any output but now is strange for me .
 
Alex Armenteros
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get this exception every time and never search for it as my programs are all working correctly despite this error.
 
Hamzah khammash
Greenhorn
Posts: 23
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex Armenteros wrote:I get this exception every time and never search for it as my programs are all working correctly despite this error.

I solve it man , it happened because i give an name for <session-factory> and this wrong so just removed my name attribute and it works , i hope it work with you to.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic