MyEclipse: MyEclipse Hibernate Quickstart problem [Closed]

Hechun - Nov 08, 2004 - 05:05 PM
Post subject: MyEclipse Hibernate Quickstart problem [Closed]
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"
support-rkalla - Nov 08, 2004 - 05:23 PM
Post subject:
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.
Hechun - Nov 08, 2004 - 05:29 PM
Post subject:
OK, Thanks.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits