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

[SOLVED] "org.hibernate.Session" ClassNotFoundException

 
Talha Kabakus
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

Despite I added all necessary .jar files to project, I always take boring exception warnings that say "class not found". I added the code and exception output below. I'll be so happy if someone can help me.

Thanks in advance..
With regards,
T

-----------------------------------------------------

---------------------------------------------------------

----------------------------------------------------------------
*Exception:*
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What libraries are you deploying?
 
Talha Kabakus
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:What libraries are you deploying?

I'm deploying these libraries:

  • hibernate-3.0.5.jar [for Hibernate]
  • json-lib-0.9.jar [for JSON Objects]
  • ojdbc14.jar [Oracle Driver]
  • persistence.jar [for Hibernate Reverse Engineering]


  • By the way I'm using Eclipse Galileo.
    Thanks.
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Are you deploying all the dependencies of those libraries? I thought Hibernate had a number of other dependencies.

    In any case, I'd both (a) make *sure* you're deploying the libraries you believe you are, (b) make sure the transitive dependencies are also deployed [1], and (c) turn debug logging on and check your application startup logs to determine the root cause of the failure.

    [1] http://mvnrepository.com/artifact/org.hibernate/hibernate/3.0.5
     
    Mustafa Garhi
    Ranch Hand
    Posts: 111
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Check the build directory of Eclipse(target e.g.) and see if the jars are copied there after the project is built.
     
    Talha Kabakus
    Greenhorn
    Posts: 23
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you so much David Newton and Mustafa Garhi for your helps and recommendations.
    As you said, the problem is occured because of build path.
    With regards,
    T
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Great; glad you worked it out!
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic