Hello,
I have oracle database of version 11.2g. Hibernate version 3.0. JDK 1.6
I have one table which have few columns of data type TIMESTAMP(3) in oracle. When I generated HBM file for this table using eclipse plugins, my column of data type Timestamp gets mapped to Java object as "Serializable" rather than Date or Timestamp.
Below are the configuration details.
Jar file used: ojdbc6.jar Dialect: org.hibernate.dialect.OracleDialect Driver: oracle.jdbc.driver.OracleDriver
I manually changed it to "Timestamp" in HBM file. This is resulting in applicable start up failure with error message:
Caused by: org.hibernate.HibernateException: Wrong column type: start_datetime, expected: date at org.hibernate.mapping.Table.validateColumns(Table.java:251) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1007) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398) ... 81 more
Is there any version or combination mist-match for dialect, hibernate version and oracle version?
Can you please guide me on this?
Thank you Geeta B
|