-->
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.  [ 5 posts ] 
Author Message
 Post subject: bug with informix serial and hibernate 3
PostPosted: Tue May 10, 2005 11:24 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
Hello,

There is a bug with the informix serial , known on the forum at http://forum.hibernate.org/viewtopic.ph ... fo+serial8

In fact, there is a patch for hibernate 2 at http://opensource.atlassian.com/project ... key=HB-414 ,
but what about H3 ? Is there a patch also ? Is this bug will be fixed in a futur version of hibernate ?


Hibernate version: 3.0.2

Full stack trace of any exception that occurs:

org.hibernate.exception.GenericJDBCException: could not insert: [com.netqi.business.beans.misc.Origin]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:57)
...
Caused by: java.sql.SQLException: Unknown first argument of dbinfo(serial8).
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3082)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
...

Name and version of the database you are using:informix online 7.3


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 11, 2005 6:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
AFAIK HB-414 is applied to both Hibernate 2.1 and 3.

What you is seeing is the effect of HB-414 which apparently work on later informix 9 and not on the way older version 7.

I would suggest you extend/implement a InformixDialect that will confirm to your older informix.

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 8:43 am 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
Hi max,

Ok to extend informixDialect, but witch method, and what to code excactly in this method ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 8:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
btw. looking at the fix then you should be able to specify the type on the identifier to make it generate the right type.

could you show your mapping if it still fails.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 12:00 pm 
Newbie

Joined: Mon Apr 11, 2005 4:55 am
Posts: 16
I looked in the code of H3, and I found the (possible) wrong method, witch is :

Code:
   public String getIdentitySelectString(String table, String column, int type)
   throws MappingException {
      return type==Types.BIGINT ?
         "select dbinfo('serial8') from systables where tabid=1" :
         "select dbinfo('sqlca.sqlerrd1') from systables where tabid=1";
   }

In fact, in the Infromix Query Tool, the first line "select dbinfo('serial8')..." throw an error. The second one is OK.

So, do I have to change this method to always return the second sentence ? I am not realy sure of what I am doing.


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