Results 1 to 7 of 7
  1. #1
    Keerthi is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default Error in Hibernate prog

    Hi All,

    I have downloaded source from net and trying to run the main method of the hibernate in Eclipse IDE. I have placed all required jar in classpath.

    I am getting error like
    java.lang.StackOverflowError
    Exception in thread "main"

    please someone help me on this.

    Thanks in advance.

    regards
    K

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    You have a method recursively calling itself in a way that will never complete.

  3. #3
    Keerthi is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Smile

    Hi,

    I was just downloaded source.
    in follwoing code, red color code causing the probelm please help me on this

    package com.vaannila.student;

    import org.hibernate.HibernateException;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;

    //import com.vaannila.util.HibernateUtil;

    public class Main {

    public static void main(String[] args) {
    //Session session = HibernateUtil.getSessionFactory().openSession();
    System.out.println("main()");
    [B]SessionFactory sessionFactory = new Configuration().configure()
    .buildSessionFactory();[/B]

    System.out.println("2");
    Session session=sessionFactory.openSession();
    System.out.println("3");
    Transaction transaction = null;
    try {
    System.out.println("4");
    transaction = session.beginTransaction();
    System.out.println("5");
    Address address1 = new Address("OMR Road", "Chennai", "TN", "600097");
    Address address2 = new Address("Ring Road", "Banglore", "Karnataka", "560000");
    Student student1 = new Student("Eswar", address1);
    Student student2 = new Student("Joe", address2);
    session.save(student1);
    session.save(student2);
    transaction.commit();
    } catch (HibernateException e) {
    transaction.rollback();
    e.printStackTrace();
    } finally {
    session.close();
    }

    }

    }
    for helping me you need any more information please let me know.
    On this point I was struck up.

    Thanks in adv............

    Rgds,
    K

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Do you get any printlns output?

  5. #5
    kanthan8 is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Hi Keerthi,

    Example from that site is very nice and working fine.
    Do you have all these jar files, if not add those to the build path.

    antlr-2.7.6
    asm-1.4.1
    cglib-2.0.2
    classes12 ( if u use oracle)
    commons-collections-3.1
    commons-logginf-1.1.1
    dom4j-1.6.1
    ehcache-1.1
    hibernate3.jar
    hsqldb ( if u use hsqldb)
    javaassisst-3.9.0.GA
    jta-1.1
    log4j-1.2.15
    mysql-connector ( if u use mysql)
    slf4j-api-1.5.8
    slf4j-simple-1.5.6

    Upto which println output did you get?
    If nothing try to add these jars....

  6. #6
    kanthan8 is offline Member
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Default

    Hi r035198x,

    I need InstallAnywhere plugin (of InstallAnywhere Collaboration plugin)for eclipse...
    Please tell me where i can download it........
    Its urgent....
    Thanks in advance

  7. #7
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

Similar Threads

  1. Replies: 1
    Last Post: 07-13-2008, 03:16 PM
  2. Hibernate error
    By Marty in forum JDBC
    Replies: 4
    Last Post: 06-04-2008, 05:03 AM
  3. Error In RAD while connecting Hibernate
    By tobalajia in forum JDBC
    Replies: 0
    Last Post: 05-08-2008, 03:37 PM
  4. Hibernate Error
    By yuchuang in forum JDBC
    Replies: 2
    Last Post: 05-15-2007, 10:24 AM
  5. Replies: 3
    Last Post: 05-14-2007, 05:10 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
  •