Hibernate - ORA-01024: invalid datatype in OCI call
---------------------------------------------------
Key: HHH-4863
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4863
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Environment: Hibernate 3.3.2 GA, Oracle 8.0.5 Enterprise Edition
Reporter: Jan Michael
Hi Hibernate,
I recently tried hibernate in Oracle 9i and use the same in Oracle 8i, however when I
tried the same settings I am getting a ORA-01024: invalid datatype in OCI call.
Bellow are my hbm settings:
<class name="SimpleVO" table="REGISTRATION">
<id name="userId" type="string" column="USER_ID"
/>
<property name="userName" type="string"
column="USER_NAME" />
<property name="regDate" type="timestamp"
column="REG_DATE" />
</class>
Bellow is my VO class:
import java.util.Date;
public class SimpleVO {
private String userId;
private String userName;
private Date regDate;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Date getRegDate() {
return regDate;
}
public void setRegDate(Date regDate) {
this.regDate = regDate;
}
}
Below is my client class:
manifest = new ManifestVO();
manifest.setUserId("01ABC");
manifest.setUserName("test_user");
manifest.setRegDate(new Date());
Session session = HibernateManager.getSession();
session.save(manifest);
session.getTransaction().commit();
HibernateManager.closeSession(session);
Here is the field Type in My Oracle 8i:
Name: Type:
REG_DATE DATE
The following settings works in Oracle 9i but not in Oracle 8i. I tried to set the hbm
type to = java.util.Date but I get the same error. I also tried to set the hbm type to
string but it inserts an empty string in the database for the date field. Please help as
this limits my capability to use hibernate in ORACLE 8 platform.
Thank you.
Cordially,
Jan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira