| Author |
Message |
|
|
Post subject: MyEclipse Hibernate Quickstart problem [Closed]
Posted: Nov 08, 2004 - 05:05 PM
|
|
Registered Member


Joined: Oct 07, 2004
Posts: 12
|
|
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" |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 08, 2004 - 05:23 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
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. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Nov 08, 2004 - 05:29 PM
|
|
Registered Member


Joined: Oct 07, 2004
Posts: 12
|
|
|
|
|
 |
|
|
| |