Hi everybody -
I'm also getting problems importing data in web tools even when the data set is not too large. I am using PostgreSQL 8.0 and trying to import about 13000 records using entity engine xml in webtools, and I get this: 2006-08-18 11:22:28,193 (http-0.0.0.0-8443-Processor8) [ EntitySaxReader.java:242:INFO ] Transaction Timeout set to 2 hours (7200 seconds) 2006-08-18 11:22:39,437 (http-0.0.0.0-8443-Processor8) [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to 1000 2006-08-18 11:22:49,361 (http-0.0.0.0-8443-Processor8) [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to 2000 2006-08-18 11:22:59,914 (http-0.0.0.0-8443-Processor8) [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to 3000 2006-08-18 11:23:15,004 (http-0.0.0.0-8443-Processor8) [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to 4000 2006-08-18 11:23:27,941 (JotmBatch) [ TransactionImpl.java: 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a...3d0497:) 2006-08-18 11:23:27,942 (JotmBatch) [ TransactionImpl.java: 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a...3d3098:) 2006-08-18 11:23:27,951 (http-0.0.0.0-8443-Processor8) [ SQLProcessor.java:155:ERROR] ---- exception report ---------------------------------------------------------- Exception: java.sql.SQLException Message: Cannot commit a transactional connection: See JDBC 2.0 Optional Package Specification section 7.1 (p25) ---- stack trace --------------------------------------------------------------- java.sql.SQLException: Cannot commit a transactional connection: See JDBC 2.0 Optional Package Specification section 7.1 (p25) org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit (XAClientConnection.java:250) org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey (GenericHelperDAO.java:90) org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1099) org.ofbiz.entity.util.EntitySaxReader.writeValues (EntitySaxReader.java:266) It seems to be a 1 minute transactino roll back, even though the timeout is set to 2 hours above. Interestingly enough, $ ant run-install will install this file correctly. Si |
Could you have line 403 of EntitySaxReader.java
include what the timeout is set to when it finishes the 1000 records and run it again? ie Debug.logImportant("Another " + valuesPerMessage + " values imported: now up to " + numberRead, module); to Debug.logImportant("Another " + valuesPerMessage + " values imported: now up to " + numberRead + "transaction timeout set to: " + transactionTimeout, module); --- Si Chen <[hidden email]> wrote: > Hi everybody - > > I'm also getting problems importing data in web > tools even when the > data set is not too large. I am using PostgreSQL > 8.0 and trying to > import about 13000 records using entity engine xml > in webtools, and I > get this: > 2006-08-18 11:22:28,193 > (http-0.0.0.0-8443-Processor8) > [ EntitySaxReader.java:242:INFO ] Transaction > Timeout set to 2 > hours (7200 seconds) > 2006-08-18 11:22:39,437 > (http-0.0.0.0-8443-Processor8) > [ EntitySaxReader.java:403:INFO ] Another 1000 > values imported: > now up to 1000 > 2006-08-18 11:22:49,361 > (http-0.0.0.0-8443-Processor8) > [ EntitySaxReader.java:403:INFO ] Another 1000 > values imported: > now up to 2000 > 2006-08-18 11:22:59,914 > (http-0.0.0.0-8443-Processor8) > [ EntitySaxReader.java:403:INFO ] Another 1000 > values imported: > now up to 3000 > 2006-08-18 11:23:15,004 > (http-0.0.0.0-8443-Processor8) > [ EntitySaxReader.java:403:INFO ] Another 1000 > values imported: > now up to 4000 > 2006-08-18 11:23:27,941 (JotmBatch) [ > TransactionImpl.java: > 765:INFO ] set rollback only > (tx=bb14:38:0:017630033c06f82b4a...3d0497:) > 2006-08-18 11:23:27,942 (JotmBatch) [ > TransactionImpl.java: > 765:INFO ] set rollback only > (tx=bb14:38:0:017630033c06f82b4a...3d3098:) > 2006-08-18 11:23:27,951 > (http-0.0.0.0-8443-Processor8) > [ SQLProcessor.java:155:ERROR] > ---- exception report > > Exception: java.sql.SQLException > Message: Cannot commit a transactional connection: > See JDBC 2.0 > Optional Package Specification section 7.1 (p25) > ---- stack trace > --------------------------------------------------------------- > java.sql.SQLException: Cannot commit a transactional > connection: See > JDBC 2.0 Optional Package Specification section 7.1 > (p25) > org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit > > (XAClientConnection.java:250) > org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) > org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) > org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) > org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) > org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey > > (GenericHelperDAO.java:90) > org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1099) > org.ofbiz.entity.util.EntitySaxReader.writeValues > (EntitySaxReader.java:266) > > It seems to be a 1 minute transactino roll back, > even though the > timeout is set to 2 hours above. > > Interestingly enough, $ ant run-install will install > this file > correctly. > > Si > |
In reply to this post by Si Chen-2
Si,
I've seen this before. Maybe the comments attached to this issue will help you: http://issues.apache.org/jira/browse/OFBIZ-37 Jacopo Si Chen wrote: > Hi everybody - > > I'm also getting problems importing data in web tools even when the data > set is not too large. I am using PostgreSQL 8.0 and trying to import > about 13000 records using entity engine xml in webtools, and I get this: > 2006-08-18 11:22:28,193 (http-0.0.0.0-8443-Processor8) [ > EntitySaxReader.java:242:INFO ] Transaction Timeout set to 2 hours (7200 > seconds) > 2006-08-18 11:22:39,437 (http-0.0.0.0-8443-Processor8) [ > EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to > 1000 > 2006-08-18 11:22:49,361 (http-0.0.0.0-8443-Processor8) [ > EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to > 2000 > 2006-08-18 11:22:59,914 (http-0.0.0.0-8443-Processor8) [ > EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to > 3000 > 2006-08-18 11:23:15,004 (http-0.0.0.0-8443-Processor8) [ > EntitySaxReader.java:403:INFO ] Another 1000 values imported: now up to > 4000 > 2006-08-18 11:23:27,941 (JotmBatch) [ TransactionImpl.java:765:INFO ] > set rollback only (tx=bb14:38:0:017630033c06f82b4a...3d0497:) > 2006-08-18 11:23:27,942 (JotmBatch) [ TransactionImpl.java:765:INFO ] > set rollback only (tx=bb14:38:0:017630033c06f82b4a...3d3098:) > 2006-08-18 11:23:27,951 (http-0.0.0.0-8443-Processor8) [ > SQLProcessor.java:155:ERROR] > ---- exception report > ---------------------------------------------------------- > Exception: java.sql.SQLException > Message: Cannot commit a transactional connection: See JDBC 2.0 Optional > Package Specification section 7.1 (p25) > ---- stack trace > --------------------------------------------------------------- > java.sql.SQLException: Cannot commit a transactional connection: See > JDBC 2.0 Optional Package Specification section 7.1 (p25) > org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit(XAClientConnection.java:250) > > org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) > org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) > org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) > org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) > org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey(GenericHelperDAO.java:90) > > org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1099) > org.ofbiz.entity.util.EntitySaxReader.writeValues(EntitySaxReader.java:266) > > It seems to be a 1 minute transactino roll back, even though the timeout > is set to 2 hours above. > > Interestingly enough, $ ant run-install will install this file correctly. > > Si |
I'm actually running a pre-geronimo version (opentaps 0.9.1) so it
couldn't be due to ofbiz-37. Strange...maybe I'll have a closer look when I have some time. Si On Aug 18, 2006, at 12:35 PM, Jacopo Cappellato wrote: > Si, > > I've seen this before. > Maybe the comments attached to this issue will help you: > > http://issues.apache.org/jira/browse/OFBIZ-37 > > Jacopo > > Si Chen wrote: >> Hi everybody - >> I'm also getting problems importing data in web tools even when >> the data set is not too large. I am using PostgreSQL 8.0 and >> trying to import about 13000 records using entity engine xml in >> webtools, and I get this: >> 2006-08-18 11:22:28,193 (http-0.0.0.0-8443-Processor8) >> [ EntitySaxReader.java:242:INFO ] Transaction Timeout set to 2 >> hours (7200 seconds) >> 2006-08-18 11:22:39,437 (http-0.0.0.0-8443-Processor8) >> [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: >> now up to 1000 >> 2006-08-18 11:22:49,361 (http-0.0.0.0-8443-Processor8) >> [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: >> now up to 2000 >> 2006-08-18 11:22:59,914 (http-0.0.0.0-8443-Processor8) >> [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: >> now up to 3000 >> 2006-08-18 11:23:15,004 (http-0.0.0.0-8443-Processor8) >> [ EntitySaxReader.java:403:INFO ] Another 1000 values imported: >> now up to 4000 >> 2006-08-18 11:23:27,941 (JotmBatch) [ TransactionImpl.java: >> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >> 3d0497:) >> 2006-08-18 11:23:27,942 (JotmBatch) [ TransactionImpl.java: >> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >> 3d3098:) >> 2006-08-18 11:23:27,951 (http-0.0.0.0-8443-Processor8) >> [ SQLProcessor.java:155:ERROR] >> ---- exception report >> ---------------------------------------------------------- >> Exception: java.sql.SQLException >> Message: Cannot commit a transactional connection: See JDBC 2.0 >> Optional Package Specification section 7.1 (p25) >> ---- stack trace >> --------------------------------------------------------------- >> java.sql.SQLException: Cannot commit a transactional connection: >> See JDBC 2.0 Optional Package Specification section 7.1 (p25) >> org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit >> (XAClientConnection.java:250) >> org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) >> org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) >> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) >> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) >> org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey >> (GenericHelperDAO.java:90) >> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java: >> 1099) >> org.ofbiz.entity.util.EntitySaxReader.writeValues >> (EntitySaxReader.java:266) >> It seems to be a 1 minute transactino roll back, even though the >> timeout is set to 2 hours above. >> Interestingly enough, $ ant run-install will install this file >> correctly. >> Si |
I bet I know what the problem is - the services in webtools
<service name="entityImport" engine="java" location="org.ofbiz.webtools.WebToolsServices" invoke="entityImport" auth="true"> do not set their own transaction timeout, so they probably default to 60 seconds. The timeout of 2 hours is set inside EntitySaxReader. I bet in some databases like PostgreSQL that I'm using, it's not going to use the EntitySaxReader's timeout if the outer timeout in the service is not set. So--should we set a timeout in the services xml or just set them not to use transaction, since the EntitySaxReader is already wrapping them in a transaction? Si On Aug 18, 2006, at 4:16 PM, Si Chen wrote: > I'm actually running a pre-geronimo version (opentaps 0.9.1) so it > couldn't be due to ofbiz-37. Strange...maybe I'll have a closer > look when I have some time. > > Si > > > On Aug 18, 2006, at 12:35 PM, Jacopo Cappellato wrote: > >> Si, >> >> I've seen this before. >> Maybe the comments attached to this issue will help you: >> >> http://issues.apache.org/jira/browse/OFBIZ-37 >> >> Jacopo >> >> Si Chen wrote: >>> Hi everybody - >>> I'm also getting problems importing data in web tools even when >>> the data set is not too large. I am using PostgreSQL 8.0 and >>> trying to import about 13000 records using entity engine xml in >>> webtools, and I get this: >>> 2006-08-18 11:22:28,193 (http-0.0.0.0-8443-Processor8) >>> [ EntitySaxReader.java:242:INFO ] Transaction Timeout set to 2 >>> hours (7200 seconds) >>> 2006-08-18 11:22:39,437 (http-0.0.0.0-8443-Processor8) >>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>> imported: now up to 1000 >>> 2006-08-18 11:22:49,361 (http-0.0.0.0-8443-Processor8) >>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>> imported: now up to 2000 >>> 2006-08-18 11:22:59,914 (http-0.0.0.0-8443-Processor8) >>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>> imported: now up to 3000 >>> 2006-08-18 11:23:15,004 (http-0.0.0.0-8443-Processor8) >>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>> imported: now up to 4000 >>> 2006-08-18 11:23:27,941 (JotmBatch) [ TransactionImpl.java: >>> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >>> 3d0497:) >>> 2006-08-18 11:23:27,942 (JotmBatch) [ TransactionImpl.java: >>> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >>> 3d3098:) >>> 2006-08-18 11:23:27,951 (http-0.0.0.0-8443-Processor8) >>> [ SQLProcessor.java:155:ERROR] >>> ---- exception report >>> ---------------------------------------------------------- >>> Exception: java.sql.SQLException >>> Message: Cannot commit a transactional connection: See JDBC 2.0 >>> Optional Package Specification section 7.1 (p25) >>> ---- stack trace >>> --------------------------------------------------------------- >>> java.sql.SQLException: Cannot commit a transactional connection: >>> See JDBC 2.0 Optional Package Specification section 7.1 (p25) >>> org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit >>> (XAClientConnection.java:250) >>> org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) >>> org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) >>> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) >>> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) >>> org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey >>> (GenericHelperDAO.java:90) >>> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java: >>> 1099) >>> org.ofbiz.entity.util.EntitySaxReader.writeValues >>> (EntitySaxReader.java:266) >>> It seems to be a 1 minute transactino roll back, even though the >>> timeout is set to 2 hours above. >>> Interestingly enough, $ ant run-install will install this file >>> correctly. >>> Si |
I would personally favor turning transactions off for those services,
since the entitysaxreader is already in transaction, there is no need to waste another set of transactions. Si On Aug 21, 2006, at 9:04 AM, Si Chen wrote: > I bet I know what the problem is - the services in webtools > > <service name="entityImport" engine="java" > location="org.ofbiz.webtools.WebToolsServices" > invoke="entityImport" auth="true"> > > do not set their own transaction timeout, so they probably default > to 60 seconds. The timeout of 2 hours is set inside > EntitySaxReader. I bet in some databases like PostgreSQL that I'm > using, it's not going to use the EntitySaxReader's timeout if the > outer timeout in the service is not set. > > So--should we set a timeout in the services xml or just set them > not to use transaction, since the EntitySaxReader is already > wrapping them in a transaction? > > Si > > > > On Aug 18, 2006, at 4:16 PM, Si Chen wrote: > >> I'm actually running a pre-geronimo version (opentaps 0.9.1) so it >> couldn't be due to ofbiz-37. Strange...maybe I'll have a closer >> look when I have some time. >> >> Si >> >> >> On Aug 18, 2006, at 12:35 PM, Jacopo Cappellato wrote: >> >>> Si, >>> >>> I've seen this before. >>> Maybe the comments attached to this issue will help you: >>> >>> http://issues.apache.org/jira/browse/OFBIZ-37 >>> >>> Jacopo >>> >>> Si Chen wrote: >>>> Hi everybody - >>>> I'm also getting problems importing data in web tools even when >>>> the data set is not too large. I am using PostgreSQL 8.0 and >>>> trying to import about 13000 records using entity engine xml in >>>> webtools, and I get this: >>>> 2006-08-18 11:22:28,193 (http-0.0.0.0-8443-Processor8) >>>> [ EntitySaxReader.java:242:INFO ] Transaction Timeout set to >>>> 2 hours (7200 seconds) >>>> 2006-08-18 11:22:39,437 (http-0.0.0.0-8443-Processor8) >>>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>>> imported: now up to 1000 >>>> 2006-08-18 11:22:49,361 (http-0.0.0.0-8443-Processor8) >>>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>>> imported: now up to 2000 >>>> 2006-08-18 11:22:59,914 (http-0.0.0.0-8443-Processor8) >>>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>>> imported: now up to 3000 >>>> 2006-08-18 11:23:15,004 (http-0.0.0.0-8443-Processor8) >>>> [ EntitySaxReader.java:403:INFO ] Another 1000 values >>>> imported: now up to 4000 >>>> 2006-08-18 11:23:27,941 (JotmBatch) [ TransactionImpl.java: >>>> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >>>> 3d0497:) >>>> 2006-08-18 11:23:27,942 (JotmBatch) [ TransactionImpl.java: >>>> 765:INFO ] set rollback only (tx=bb14:38:0:017630033c06f82b4a... >>>> 3d3098:) >>>> 2006-08-18 11:23:27,951 (http-0.0.0.0-8443-Processor8) >>>> [ SQLProcessor.java:155:ERROR] >>>> ---- exception report >>>> ---------------------------------------------------------- >>>> Exception: java.sql.SQLException >>>> Message: Cannot commit a transactional connection: See JDBC 2.0 >>>> Optional Package Specification section 7.1 (p25) >>>> ---- stack trace >>>> --------------------------------------------------------------- >>>> java.sql.SQLException: Cannot commit a transactional connection: >>>> See JDBC 2.0 Optional Package Specification section 7.1 (p25) >>>> org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.commit >>>> (XAClientConnection.java:250) >>>> org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:152) >>>> org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:203) >>>> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:568) >>>> org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:520) >>>> org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey >>>> (GenericHelperDAO.java:90) >>>> org.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java: >>>> 1099) >>>> org.ofbiz.entity.util.EntitySaxReader.writeValues >>>> (EntitySaxReader.java:266) >>>> It seems to be a 1 minute transactino roll back, even though the >>>> timeout is set to 2 hours above. >>>> Interestingly enough, $ ant run-install will install this file >>>> correctly. >>>> Si |
Si,
this does make sense... and it's great that you have discovered the root of this timeout issue. Jacopo Si Chen wrote: > I would personally favor turning transactions off for those services, > since the entitysaxreader is already in transaction, there is no need to > waste another set of transactions. > > Si > |
Free forum by Nabble | Edit this page |