-
1. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
epbernard Sep 19, 2006 7:40 PM (in response to fbadt)hibernate cannot read the db table apparently, check that it is in your DB.
-
2. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
fbadt Sep 19, 2006 7:53 PM (in response to fbadt)yup. It is my DB. I can get to it fine with the same ID/pass via a test program to just select from the table, without "for update" and isql also.
* note: using - strategy=GenerationType.TABLE and informix drivers from
http://www14.software.ibm.com/webapp/download/search.jsp?go=y&rs=ifxjdbc
Here is the kicker... This is being run in JBoss 4.04 so I grabbed the hibernate 3.2rc2 source and traced into the code. It dies here as below from the below sql:
"select value from test_tab2 where key_name = 'PK_TABLE' for update"
** the same sql, without "for update", queries fine.
MultipleHiLoPerTableGenerator(line 145)
==> result = rs.getInt(1);
ERROR [MultipleHiLoPerTableGenerator] could not read or init a hi value
java.sql.SQLException: null java.lang.NullPointerException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:448)
at com.informix.jdbc.IfxValue.a(IfxValue.java:424)
at com.informix.jdbc.IfxValue.a(IfxValue.java:350)
at com.informix.jdbc.IfxRowColumn.a(IfxRowColumn.java:279)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:4340)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:654)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:626)
at com.informix.jdbc.IfxResultSet.getInt(IfxResultSet.java:1075)
at org.jboss.resource.adapter.jdbc.WrappedResultSet.getInt(WrappedResultSet.java:677)
at org.hibernate.id.MultipleHiLoPerTableGenerator.doWorkInCurrentTransaction(MultipleHiLoPerTableGenerator.java:145) -
3. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
epbernard Sep 19, 2006 10:29 PM (in response to fbadt)what is the way in Informix to acquire a row lock? AFAIK this is FOR UPDATE.
-
4. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
fbadt Sep 20, 2006 8:11 AM (in response to fbadt)Right. Use "FOR UPDATE" to get a row lock. The hibernate code appears to do this so it can udpate the counter in an atomic transaction. That seems fine. Not sure what you are trying trying to convey. Can you restate or email me in private?
-
5. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
fbadt Sep 21, 2006 10:09 AM (in response to fbadt)Switched to datadirect drivers from Informix ones and things seem to work fine now.
-
6. Re: using GenerationType.TABLE - ERROR [MultipleHiLoPerTable
fbadt Sep 21, 2006 10:09 AM (in response to fbadt)Switched to datadirect drivers from Informix ones and things seem to work fine now.