Results 1 to 4 of 4
  1. #1
    mDennis10 is offline Member
    Join Date
    Jul 2011
    Posts
    76
    Rep Power
    0

    Default ClassNotFoundException: org.hibernate.cfg.Configuration

    I am writing a web application in java for the first time and using hibernate framework. When I run my index.jsp class that invokes hibernate I am getting ClassNotFoundException: org.hibernate.cfg.Configuration. I figure the problem it that the hibernate.cfg.xml file is not being location so I went online and found some information has how to approach this. So what I did now is create a new folder called config and put the hibernate.cfg.xml file in it then config the build path making config a class folder. But the problem still exist. Is the problem that the hibernate.cfg.xml file is not being located and if so how do i fix this

    ClassNotFoundException: org.hibernate.cfg.Configuration-hibernate.jpg

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default Re: ClassNotFoundException: org.hibernate.cfg.Configuration

    Are the hibernate jar files deployed?
    And is it only the one version of hibernate?
    Please do not ask for code as refusal often offends.

  3. #3
    mDennis10 is offline Member
    Join Date
    Jul 2011
    Posts
    76
    Rep Power
    0

    Default Re: ClassNotFoundException: org.hibernate.cfg.Configuration

    Don't fully understand what u mean when u say that if the hibernate jar files are deployed but I did add all the hibernate jar files in the build path and yes it is only one version.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default Re: ClassNotFoundException: org.hibernate.cfg.Configuration

    I don't know how you;re deploying this to the server (I never rely on in built servers in IDEs), but those jar files need to be in the WEB-INF/lib directory of your deployed application.
    If they are then you'll need to list that directory here so we can see what has been deployed there.
    Please do not ask for code as refusal often offends.

Similar Threads

  1. ClassNotfoundException
    By shirleympearls in forum New To Java
    Replies: 4
    Last Post: 10-17-2011, 08:12 PM
  2. Could not parse configuration: /hibernate.cfg.xml
    By Matang in forum Web Frameworks
    Replies: 2
    Last Post: 04-10-2011, 02:28 PM
  3. classNotFoundException
    By jyothi.priyanka in forum NetBeans
    Replies: 5
    Last Post: 08-24-2010, 10:13 AM
  4. JVM configuration, -xmx over 4 gb
    By tolja in forum Advanced Java
    Replies: 3
    Last Post: 06-30-2010, 12:09 PM
  5. Replies: 2
    Last Post: 06-30-2007, 03:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •