PostgresqlPlugIn.framework bug?
PostgresqlPlugIn.framework bug?
- Subject: PostgresqlPlugIn.framework bug?
- From: Lars Sonchocky-Helldorf <email@hidden>
- Date: Thu, 9 Jul 2009 17:16:52 +0200
Hi,
in an application with which I use the PostgresqlPlugIn.framework of
Wonder (latest version, downloaded today) I get the following exception:
Jul 09 13:57:01 UNUserInterface[2020] (ERXNSLogLog4jBridge.java:43)
WARN NSLog -
<er.extensions.appserver.ERXDirectActionRequestHandler>: Exception
while handling action named "customPublicationMicroSite" on action
class "null" :ERROR: syntax error at or near "ON"at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
(QueryExecutorImpl.java:1608)
at org.postgresql.core.v3.QueryExecutorImpl.processResults
(QueryExecutorImpl.java:1343)
at org.postgresql.core.v3.QueryExecutorImpl.execute
(QueryExecutorImpl.java:194)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute
(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
(AbstractJdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute
(AbstractJdbc2Statement.java:343)
at
com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAn
dExecute(JDBCChannel.java:265)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression
(JDBCChannel.java:337)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression
(JDBCChannel.java:296)
at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes
(JDBCChannel.java:220)
at
com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationE
ditingContext(EODatabaseChannel.java:897)
at
com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecific
ation(EODatabaseChannel.java:234)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3055)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(
EODatabaseContext.java:3195)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecif
ication(EOObjectStoreCoordinator.java:488)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4069)
at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:
1114)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4444)
(full stacktrace here:
Jul 09 13:57:01 UNUserInterface[2020] (ERXNSLogLog4jBridge.java:43) WARN NSLog - <er.extensions.appserver.ERXDirectActionRequestHandler>: Exception while handling action named "customPublicationMicroSite" on action class "null" :ERROR: syntax error at or near "ON"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:343)
at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:265)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337)
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:1114)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4444)
at de.refline.base.bl.RLBABLSearchEntityProcess.commit(RLBABLSearchEntityProcess.java:132)
at ch.unio.publication.bl.UNPBBLAbstractSearchPublicationPeriodProcess.commit(UNPBBLAbstractSearchPublicationPeriodProcess.java:181)
at ch.unio.publication.bl.UNPBBLSearchUpsellingPublicationPeriodProcess.commit(UNPBBLSearchUpsellingPublicationPeriodProcess.java:42)
at ch.unio.userinterface.bl.UNUIBLCustomPublicationListProvider.collectPublicationPeriodsForProc(UNUIBLCustomPublicationListProvider.java:96)
at ch.unio.userinterface.bl.UNUIBLCustomPublicationListProvider.publicationList(UNUIBLCustomPublicationListProvider.java:67)
at UNUIWOCustomPublicationListPage.publicationList(UNUIWOCustomPublicationListPage.java:184)
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 KeyValueCodingProtectedAccessor.methodValue(KeyValueCodingProtectedAccessor.java:60)
at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
at com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
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)
at com.webobjects.appserver._private.WOConditional.evaluateCondition(WOConditional.java:60)
at com.webobjects.appserver._private.WOConditional.appendToResponse(WOConditional.java:93)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
at com.webobjects.appserver._private.WOConditional.appendToResponse(WOConditional.java:94)
at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
at com.netmatic.base.wo.NMBasWODynamicHTMLComponent.appendToResponse(NMBasWODynamicHTMLComponent.java:36)
at UNUIWOComponent.appendToResponse(UNUIWOComponent.java:90)
at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:278)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124)
at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1802)
at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1767)
at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:637)
)
The following SQL was generated and caused the exception (I have
formatted it a little for better readability):
SELECT
t0.acceptance_due_date,
t0.controlled_date,
t0.edition_fi,
t0.end_date,
t0.external_id,
t0.external_Invoice_Number,
t0.freeze_publication_date,
t0.internal_charge,
t0.invoiced_date,
t0.publication_fi,
t0.publication_period_id,
t0.publish_publication_date,
t0.start_date
FROM
UN_PB_PUBLICATION_PERIOD t0
INNER JOIN
UN_PB_PUBLICATION T1
ON t0.publication_fi = T1.publication_id
INNER JOIN
UN_PB_PUBLICATION T3
ON t0.publication_fi = T3.publication_id
INNER JOIN
UN_PB_PUBLICATION_STATE T2
ON T1.publication_state_fi = T2.publication_state_id
INNER JOIN
UN_PB_ORDER T10
ON T10.advertisment_fi = T11.advertisement_id
INNER JOIN
UN_PB_ADVERTISEMENT T11
ON T11.company_unit_fi = T12.company_unit_id
INNER JOIN
UN_PB_UPSELLING T4
ON T3.sup_upselling_fi = T4.upselling_id
INNER JOIN
UN_PB_PUBLICATION T9
ON T4.upselling_id = T9.upselling_fi
INNER JOIN
UN_PB_PUBLICATION T5
ON T4.upselling_id = T5.hidden_linked_upselling_fi
INNER JOIN
UN_PB_ORDER T6
ON T5.order_fi = T6.order_id
INNER JOIN
UN_PB_ADVERTISEMENT T7
ON T6.advertisment_fi = T7.advertisement_id
INNER JOIN
RL_JM_COMPANY_UNIT T8
ON T7.company_unit_fi = T8.company_unit_id
INNER JOIN
ON T9.order_fi = T10.order_id
WHERE (
T1.transfer_queue_entry_fi is NULL
AND T2.internal_name = ?::varchar(50)
AND T1.medium_fi = ?::numeric
AND t0.end_date >= ?::timestamp
AND t0.start_date <= ?::timestamp
AND
(
(
T6.is_demo_flag <> ?::numeric
AND T8.parent_fi = ?::numeric
)
OR
(
T10.is_demo_flag <> ?::numeric
AND T12.parent_fi = ?::numeric
)
)
AND T1.type = ?::numeric
)
" withBindings:
1:"ready_to_go"(internalName),
2:124767(mediumFI),
3:2009-07-08 17:50:18.916(endDate),
4:2009-07-08 17:50:18.916(startDate),
5:1(isDemoFlag),
6:710935(parentFI),
7:1(isDemoFlag),
8:710935(parentFI),
9:1(type)
In the above SQL I noticed that the last INNER JOIN is faulty, it
omitted some table to join, but then both tables joined there (ON
T9.order_fi = T10.order_id) are already aliased correctly in earlier
INNER JOINS: UN_PB_PUBLICATION T9 and UN_PB_ORDER T10. My guess is
that instead of an INNER JOIN an additional WHERE clause should have
been generated here - but I am not sure if I screwed up something
(maybe) …
Here's also the formatted FetchSpec (which looks correct to me) if
this is helpful for finding the cause:
<class com.webobjects.eocontrol.EOFetchSpecification(entityName=UNPBEOPublicationPeriod,
qualifier=
(
(
publication.type = 1
)
and
(
(
(
upsellingPublication.superiorUpselling.publications.order.advertisement.companyUnit.parent = (de.refline.jobmanager.eo.RLJMEOCompanyUnit)'<de.refline.jobmanager.eo.RLJMEOCompanyUnit pk:"710935">'
)
and
(
upsellingPublication.superiorUpselling.publications.order.isDemoFlag <> 1
)
)
or
(
(
upsellingPublication.superiorUpselling.publicationsInContextOfHiddenLinkedUpselling.order.advertisement.companyUnit.parent = (de.refline.jobmanager.eo.RLJMEOCompanyUnit)'<de.refline.jobmanager.eo.RLJMEOCompanyUnit pk:"710935">'
)
and
(
upsellingPublication.superiorUpselling.publicationsInContextOfHiddenLinkedUpselling.order.isDemoFlag <> 1
)
)
)
and
(
startDate <= (com.webobjects.foundation.NSTimestamp)'2009-07-08 16:20:29 Etc/GMT'
)
and
(
endDate >= (com.webobjects.foundation.NSTimestamp)'2009-07-08 16:20:29 Etc/GMT'
)
and
(
publication.medium = (ch.unio.mediadb.eo.UNMDEOOnlineMedium)'<ch.unio.mediadb.eo.UNMDEOOnlineMedium pk:"124767">'
)
and
(
publication.state.internalName = 'ready_to_go'
)
and
(
publication.transferQueueEntry = null
)
),
isDeep=true,
usesDistinct=false,
sortOrdering=null,
hints=null,
_prefetchingRelationshipKeyPaths = null)>
regards,
Lars
_______________________________________________
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