-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate operation: could not insert:
PostPosted: Thu Jan 03, 2008 4:11 pm 
Newbie

Joined: Thu Jan 03, 2008 4:03 pm
Posts: 2
I am able to update and delete records from this table, but I am not able to insert a new record into the table. I am using Hibernate 3.2 with an Oracle 9i DB. This specific table has a sequence on the primary key. I am also mapping BigInteger with the Oracle type of Number. This is the error I get:

Hibernate operation: could not insert: [ErrorLogHistory];
uncategorized SQLException for SQL [
insert into arms_own.error_log (error_log_id, error_cd, error_dt, error_message_tx, procedure_nm, appl_record_source_id)
values (ERROR_LOG_ID_SEQ.nextval, ?, ?, ?, ?, ?)];
SQL state [null]; error code [17023]; Unsupported feature;

<hibernate-mapping>
<class name="ErrorLogHistory" table="arms_own.error_log" lazy="true">
<id column="error_log_id" name="id" type="java.math.BigInteger">
<generator class="sequence">
<param name="sequence">ERROR_LOG_ID_SEQ</param>
</generator>
</id>
<property name="errorCd" not-null="false" length="15" column="error_cd" type="java.lang.String"/>
<property name="errorDt" not-null="false" length="4" column="error_dt" type="java.util.Date"/>
<property name="errorMessageTx" not-null="false" length="1000" column="error_message_tx" type="java.lang.String"/>
<property name="procedureNm" not-null="false" length="50" column="procedure_nm" type="java.lang.String"/>
<property name="applRecordSourceId" not-null="false" column="appl_record_source_id" type="java.lang.Integer"/>
</class>
</hibernate-mapping>

Thank you for any help.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 03, 2008 5:33 pm 
Newbie

Joined: Thu Jan 03, 2008 4:03 pm
Posts: 2
I found the problem. I should have mapped the id to Integer instead of BigInteger.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.