facebook

Adding Hibernate to a plain java project

  1. MyEclipse Archived
  2.  > 
  3. General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #287416 Reply

    Max Mirabito
    Participant

    I am using MyEclipse 6.5.1 and I am getting a problem.

    1) I create a plain java project (not WEB) and create a Test class with a main method.

    2) I run the class by selecting the “Run Open Dialog” and it works it displays “hello”

    3) I then decide to add Hibernate capabilities and myeclipse includes jar files creates an hibernatesessionfactory and includes an XML cfg

    4) Then i just try to run my test class (note I did not add any new code) I just introduced the “hibernate” capabilities and I get the following error from the console. The class path looks to be okay

    java.lang.NoClassDefFoundError: Test
    Exception in thread "main" 

    Any clue if is this is standard behavior or what I need to do to fix it?

    Thanks

    Max

    #287431 Reply

    Loyal Water
    Member

    Thats weird. Can you try reproducing this with a new project. Do you face the same issue?

    #287466 Reply

    Max Mirabito
    Participant

    Hi Nipun,

    Yes i did create a new project several times and i get the same problem. So based on you answere I should be able to add hibernate capabilites to a regular java project and still be able to run my class?

    thankks

    Max

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Adding Hibernate to a plain java project

You must be logged in to post in the forum log in