Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Hibernate - DB2/400 - Journalling and commit
PostPosted: Fri Oct 03, 2003 7:05 am 
Beginner
Beginner

Joined: Mon Sep 01, 2003 10:52 am
Posts: 23
Location: UK
Folks

I have an hibernate application up and running in development against a DB2/400.
At this stage I point out that I am no iSeries(AS400) expert.

The app runs fine when the DB2/400 files are journaled, but when they are not journaled(as is the intended case for production- don't ask me why?) I get the following

[03/10/03 11:28:03:881 BST] 170a4eee JDBCException E net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged java.sql.SQLException: [SQL7008] TKD6CPP in LTRAPF not valid for operation.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:520)
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:822)
at com.ibm.as400.access.AS400JDBCPreparedStatement.executeUpdate(AS400JDBCPreparedStatement.java:1179)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:478)


which I have been informed by the AS400 guys that it would appear that
hibernate is expecting the DB2/400 file to be journaled. Is this the case?

Any advice would be appreciated

cheers
Paul


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 03, 2003 1:56 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This sounds like a JDBC driver issue.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 03, 2003 2:44 pm 
Beginner
Beginner

Joined: Fri Aug 29, 2003 12:38 am
Posts: 22
Location: Phoenix, AZ
The problem is that Hibernate will require transactions, and without journaling DB2/400 is not capable of SQL transactions. You will REQUIRE journaling to work with hibernate, or hack hibernate to append "with nc" to every sql statement and remove use of transactions.

You will also run into problems if you are not using OS400 V5R4 or higher due to problems with ORDER BY on columns that are not SELECTed

This is all from experience with a medium complexity project working with DB2/400


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 06, 2004 1:01 pm 
Beginner
Beginner

Joined: Mon Mar 08, 2004 6:09 pm
Posts: 20
Hi...
Paul, did you find any workaround to this issue??

I'm facing the same problem.
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 10:53 pm 
Beginner
Beginner

Joined: Fri Aug 29, 2003 12:38 am
Posts: 22
Location: Phoenix, AZ
The workaround is to have journaling on. Hibernate will not work without it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 23, 2004 1:16 am 
Newbie

Joined: Tue Sep 14, 2004 11:33 pm
Posts: 6
I too had to work against an AS400 database with journalling off. Setting hibernate.connection.isolation 0 worked for me, however each statement was autocommitted.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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.