-->
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.  [ 4 posts ] 
Author Message
 Post subject: Strange ORA-12899 exception
PostPosted: Tue Oct 21, 2008 9:04 am 
Newbie

Joined: Tue Oct 21, 2008 8:56 am
Posts: 2
I'm working with hibernate 3.2.5.ga, annotation 3.3.0.ga, commons-annotation 3.0.0.ga, entity-manager 3.3.1.ga with Oracle 10g on Suse Linux, thin driver.

I'm getting the following error from time to time. It doesn't happen all the time, the same sql works fine most of the time, but for some specific records it doesn't. Note that the parameters binding is correct.


Code:
2008-10-21 13:29:23,697 DEBUG [org.hibernate.SQL] -
    insert
    into
        VTOURSPRODUCT.EN_TEXTDESCRIPTIONS
        (ADDRESSEXTRAINFO, DISTANCEEXTRAINFO, GASTRONOMYEXTRAINFO, HOTELDESCRIPTION, IMPORTANTINFORMATION, PAYMENTINFO, ROOMEXTRAINFO, SERVICEEXTRAINFO, SPORTEXTRAINFO, CREATIONTIME, IDHOTELBASE, IDIOM)
    values
        (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 1
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 2
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 3
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 4
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 5
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 6
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 7
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 8
2008-10-21 13:29:23,697 DEBUG [org.hibernate.type.StringType] - binding null to parameter: 9
2008-10-21 13:29:23,698 DEBUG [org.hibernate.type.TimestampType] - binding '2008-10-21 13:28:54' to parameter: 10
2008-10-21 13:29:23,698 DEBUG [org.hibernate.type.StringType] - binding '3504' to parameter: 11
2008-10-21 13:29:23,698 DEBUG [org.hibernate.type.StringType] - binding 'es' to parameter: 12
2008-10-21 13:29:23,711 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 12899, SQLState: 72000
2008-10-21 13:29:23,711 ERROR [org.hibernate.util.JDBCExceptionReporter] - ORA-12899: Wert zu grofür Spalte "VTOURSPRODUCT"."EN_TEXTDESCRIPTIONS"."IDIOM" (aktuell: 4, maximal: 2)



The table:

Code:
desc vtoursproduct.en_textdescriptions
Name                           Null     Type                                                                                                                                                                                         
------------------------------ -------- --------------------------------------
IDIOM                          NOT NULL VARCHAR2(2)                                                                                                                                                                                   
HOTELDESCRIPTION                        VARCHAR2(2000)                                                                                                                                                                               
ADDRESSEXTRAINFO                        VARCHAR2(2000)                                                                                                                                                                               
DISTANCEEXTRAINFO                       VARCHAR2(2000)                                                                                                                                                                               
SERVICEEXTRAINFO                        VARCHAR2(2000)                                                                                                                                                                               
ROOMEXTRAINFO                           VARCHAR2(2000)                                                                                                                                                                               
SPORTEXTRAINFO                          VARCHAR2(2000)                                                                                                                                                                               
GASTRONOMYEXTRAINFO                     VARCHAR2(2000)                                                                                                                                                                               
IMPORTANTINFORMATION                    VARCHAR2(2000)                                                                                                                                                                               
CREATIONTIME                   NOT NULL DATE                                                                                                                                                                                         
HOTELCODE                               VARCHAR2(50)                                                                                                                                                                                 
IDHOTELBASE                    NOT NULL VARCHAR2(50)                                                                                                                                                                                 
PAYMENTINFO                             VARCHAR2(2000)                                                                                                                                                                               

13 rows selected

As usual, this doesn't happen in my development environment.

Has anyone ever seen something like this?

Thanks guys!
Code:
Code:


Top
 Profile  
 
 Post subject: Re: Strange ORA-12899 exception
PostPosted: Tue Oct 21, 2008 10:17 am 
Newbie

Joined: Thu Oct 09, 2008 4:03 pm
Posts: 16
Location: US, Itasca Illinois
Hi,

I've run into this problem quite often even outside Hibernate. What is happening is that the IDIOM field can only hold 2 characters of data. Some of the data that the program is trying to add into IDIOM is more than 2 characters. It is not surprising to find entirely different data than you expect once your program runs in a different environment :) You will need to find out if the data is valid and if it is, make the IDIOM database field large enough to hold the largest value.

Regards,
Lynette


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2008 12:00 pm 
Newbie

Joined: Tue Oct 21, 2008 8:56 am
Posts: 2
Hi,

Thanks for answering.

If you see at the bindings, hibernate is doing correctly and the value being bound has the correct size. This is the strange thing. Althoug the value being bound has only 2 chars, I keep getting this error.

Code:
2008-10-21 13:29:23,698 DEBUG [org.hibernate.type.StringType] - binding 'es' to parameter: 12


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2008 2:18 pm 
Newbie

Joined: Thu Oct 09, 2008 4:03 pm
Posts: 16
Location: US, Itasca Illinois
I'm at a loss to know what is going on! I know it appears that 'es' is bound properly, but the error says that a 4 character field is being inserted:

"."EN_TEXTDESCRIPTIONS"."IDIOM" (aktuell: 4, maximal: 2)

The field right before this one has 4 characters, '3504'. In older releases of Hibernate, people have had issues with the binding order getting reversed. I wish I had more insight to share, but my best guess is that somehow the order is getting reversed, no matter what displays in the debug messages.

http://opensource.atlassian.com/project ... se/HHH-960

Regards,
Lynette


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.