Re: ERXBatchingDisplayGroup and batch size
Re: ERXBatchingDisplayGroup and batch size
- Subject: Re: ERXBatchingDisplayGroup and batch size
- From: Louis Demers <email@hidden>
- Date: Thu, 18 Oct 2012 18:30:12 -0400
Wow,
1) turned on sql loggin (which I hsould have tought of by mayself , head in shame)
2) setup the crash
3) cut and pasted the sql and now crashed Mail because the request was so f****** big ! here is the start
Oct 18 18:21:12 DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT t0.assemblyTransaction_id, t0.averageCost, t0.billNumber, t0.contact_id, t0.cost, t0.dateEnd, t0.dateStart, t0.id, t0.location_id, t0.locked, t0.note, t0.part_id, (t0.id), t0.project_id, t0.purchaseOrder, t0.quantity, t0.receptionNumber, t0.reversedTransaction_id, t0.runningTotalCost, t0.runningTotalQty, t0.transactionTypeID FROM Transaction t0 WHERE (t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id =
?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR t0.id = ?::int4 OR
.... followed by
withBindings: 1:63711(id), 2:63718(id), 3:63719(id), 4:32381(id), 5:36865(id), 6:27447(id), 7:63363(id), 8:63786(id), 9:63785(id), 10:63788(id), 11:63097(id), 12:63854(id), 13:63920(id), 14:63919(id), 15:63878(id), 16:63877(id), 17:8522(id), 18:6847(id), 19:6839(id), 20:6836(id), 21:6835(id), 22:6829(id), 23:6818(id), 24:6809(id), 25:6806(id), 26:6807(id), 27:6804(id), 28:6805(id), 29:6803(id), 30:6798(id), 31:6799(id), 32:6796(id), 33:6797(id), 34:6794(id), 35:6795(id), 36:6792(id), 37:6793(id), 38:6790(id), 39:6791(id), 40:6788(id), 41:6789(id), 42:6786(id), 43:6787(id), 44:6785(id), 45:6911(id), 46:6908(id), 47:6907(id), 48:6902(id), 49:6903(id), 50:6900(id), 51:6901(id), 52:6898(id), 53:6899(id), 54:6897(id), 55:6894(id), 56:6895(id), 57:6893(id), 58:6888(id), 59:6889(id), 60:6886(id), 61:6887(id), 62:6884(id), 63:6885(id), 64:6882(id), 65:6883(id), 66:6880(id), 67:6881(id), 68:6879(id), 69:6876(id), 70:6877(id), 71:6874(id), 72:6875(id), 73:6873(id), 74:6860(id), 75:6861(id), 76:6858(id), 77:6859(id), 78:6856(id), 79:6850(id), 80:6848(id), 81:6718(id), 82:6716(id), 83:6717(id), 84:6714(id), 85:6715(id), 86:6712(id), 87:6713(id), 88:6711(id), 89:6704(id), 90:6700(id), 91:6696(id), 92:6694(id), 93:6695(id), 94:6692(id), 95:6693(id), 96:6688(id), 97:6689(id), 98:6686(id), 99:6687(id), 100:6684(id), 101:6685(id), 102:6683(id), 103:6680(id), 104:6681(id), 105:6679(id), 106:6670(id), 107:6668(id), 108:6669(id), 109:6666(id), 110:6667(id), 111:6662(id), 112:6660(id), 113:6661(id), 114:6774(id), 115:6772(id), 116:6773(id), 117:6770(id), 118:6771(id), 119:6769(id), 120:6765(id), 121:6752(id), 122:6751(id), 123:6741(id), 124:6734(id), 125:6735(id), 126:7100(id), 127:7094(id), 128:6023(id), 129:7084(id), 130:7072(id), 131:7073(id), 132:7070(id), 133:7071(id), 134:7066(id), 135:7064(id), 136:7065(id), 137:7062(id), 138:7058(id), 139:7054(id), 140:7055(id), 141:7040(id), 142:7041(id), 143:6128(id), 144:6974(id), 145:6975(id), 146:6970(id), 147:6964(id), 148:6963(id), 149:6960(id), 150:6961(id), 151:6958(id), 152:6959(id)
, 153:6956(id), 154:6957(id), 155:6954(id), 156:6955(id), 157:6953(id), 158:6944(id), 159:6942(id), 160:6943(id), 161:6941(id), 162:6932(id), 163:6931(id), 164:6927(id), 165:6922(id), 166:7026(id), 167:7027(id), 168:7002(id), 169:6998(id), 170:6992(id), 171:6990(id), 172:6991(id), 173:6988(id), 174:6989(id), 175:6986(id), 176:6987(id), 177:6984(id), 178:6985(id), 179:6982(id), 180:6983(id), 181:6978(id), 182:6979(id), 183:6976(id), 184:6334(id), 185:6333(id), 186:6331(id), 187:6328(id), 188:6326(id), 189:6327(id), 190:6311(id), 191:6306(id), 192:6307(id), 193:6298(id), 194:6299(id), 195:10393(id), 196:10388(id), 197:6293(id), 198:6290(id), 199:10387(id), 200:18574(id), 201:6284(id), 202:10381(id), 203:6282(id), 204:6283(id), 205:10376(id), 206:6281(id), ..........
that line has 2059805 characters in it !!!!
here is my appendToResponse where I setup the displaygroup
EOQualifier eoq;
eoq = ERXQ.equals(Transaction.TRANSACTION_TYPE_KEY, standardTransactionType);
if (dateBefore != null)
eoq = ERXQ.and(eoq, ERXQ.lessThan(Transaction.DATE_END_KEY, dateBefore));
if (dateAfter != null)
eoq = ERXQ.and(eoq, ERXQ.greaterThan(Transaction.DATE_END_KEY, dateAfter));
if (selectedProject != null)
eoq = ERXQ.and(eoq, ERXQ.equals(Transaction.PROJECT_KEY, selectedProject));
fs = new ERXFetchSpecification<Transaction>(Transaction.ENTITY_NAME, eoq, null);
ds.setFetchSpecification(fs);
dg.setDataSource(ds);
// log.debug("sort: " + dg.sortOrderings());
dg.fetch();
super.appendToResponse(response, context);
On 2012-10-18, at 18:14 , Chuck Hill <email@hidden> wrote:
> What is the SQL that is causing that exception?
>
> Chuck
>
>
> On 2012-10-18, at 3:04 PM, Louis Demers wrote:
>
>> Hi,
>>
>> Converted some pages from WODisplayGroup to use ERXBatchingDisplayGroup. Formerly, one could enter a batchsize of 0 to get all the objects. Now when i do that, or a very large number, I get an unrecoverable exception that forces me to restart the applications and the database (PostgreSQL). If i first put a small number, then I can ask any number including 0 and it works...
>>
>>
>> The exeption I get is Oct 18 17:58:11 INFO er.transaction.adaptor.Exceptions - Database Exception occured: This connection has been closed.at org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:712)
>> at org.postgresql.jdbc2.AbstractJdbc2Connection.rollback(AbstractJdbc2Connection.java:729)
>> at com.webobjects.jdbcadaptor.JDBCContext.rollbackTransaction(JDBCContext.java:488)
>> at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:340)
>> at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296)
>> at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:220)
>> at com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:897)
>> at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234)
>> at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055)
>> at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3195)
>> at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
>> at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
>> at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1306)
>> at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444)
>> at er.extensions.eof.ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(ERXEOGlobalIDUtilities.java:290)
>> at er.extensions.eof.ERXEOControlUtilities.objectsInRange(ERXEOControlUtilities.java:662)
>> at er.extensions.batching.ERXBatchingDisplayGroup.objectsInRange(ERXBatchingDisplayGroup.java:384)
>> at er.extensions.batching.ERXBatchingDisplayGroup.refetch(ERXBatchingDisplayGroup.java:423)
>> at er.extensions.batching.ERXBatchingDisplayGroup.refetchIfNecessary(ERXBatchingDisplayGroup.java:132)
>> at er.extensions.batching.ERXBatchingDisplayGroup.hasMultipleBatches(ERXBatchingDisplayGroup.java:229)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
>> at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
>> at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
>> at com.webobjects.appserver.WODisplayGroup.valueForKey(WODisplayGroup.java:3122)
>> at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
>> at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
>> at com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:151)
>> at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
>> at com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
>> at com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
>> at com.webobjects.appserver.WOAssociation.booleanValueInComponent(WOAssociation.java:276)
>>
>> ....
>>
>> Louis Demers eng.
>> Vice-President, Co-Founder
>> Obzerv Technologies Inc.
>> 400 Jean Lesage, suite 201
>> Quebec, QC, Canada
>> G1K 8W1
>> T 418.524.3522
>> F 418.524.6745
>> www.obzerv.com
>>
>>
>>
>>
>> Louis Demers eng.
>> www.obzerv.com
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Chuck Hill Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/gvc/practical_webobjects
>
> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>
>
>
>
>
>
>
>
Louis Demers eng.
Vice-President, Co-Founder
Obzerv Technologies Inc.
400 Jean Lesage, suite 201
Quebec, QC, Canada
G1K 8W1
T 418.524.3522
F 418.524.6745
www.obzerv.com
Louis Demers eng.
www.obzerv.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden