facebook

MyEclipse Hibernate Quickstart problem [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #219090 Reply

    Hechun Chen
    Member

    Hi:

    When I am following the “MyEclipse Hibernate Quickstart”. I could not save the data to database, but get exception as following. How could I fix the problem ?

    Regards
    Hechun

    log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Hibernate ExceptionCould not save objectjava.lang.RuntimeException: net.sf.hibernate.JDBCException: Could not save object
    at com.yourcompany.HibernateTest.main(HibernateTest.java:37)
    Caused by: net.sf.hibernate.JDBCException: Could not save object
    at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:776)
    at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:731)
    at com.yourcompany.HibernateTest.main(HibernateTest.java:31)
    Caused by: java.sql.SQLException: Fail to convert to internal representation
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:226)
    at oracle.jdbc.driver.CharCommonAccessor.getLong(CharCommonAccessor.java:238)
    at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:521)
    at net.sf.hibernate.id.IncrementGenerator.getNext(IncrementGenerator.java:69)
    at net.sf.hibernate.id.IncrementGenerator.generate(IncrementGenerator.java:42)
    at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:758)
    … 2 more
    Exception in thread “main”

    #219098 Reply

    Riyad Kalla
    Member

    Hechun,
    This is really a question for the Hibernate forums, not MyEclipse… I’m not saying this because I don’t want to help, but becuase I don’t know and it really is an issue dealing with hibernate functionality and the oracle driver. I’m sure people that have run into this can help you more effective there.

    #219099 Reply

    Hechun Chen
    Member

    OK, Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: MyEclipse Hibernate Quickstart problem [Closed]

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