Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035308Retail ModulesStoreServerpublic2017-02-20 14:192017-03-29 13:10
mtaal 
AugustoMauch 
normalminorhave not tried
closedunable to reproduce 
5
 
RR17Q2 
AugustoMauch
No
0035308: Error in whereclause in dataset table only shows sql message but not the original query
When you make a mistake in the where clause of a dataset table the export or validate only shows the sql message.

Set a wrong sql in dataset table whereclause and export.
It is more insightfull to show the full sql also.
No tags attached.
Issue History
2017-02-20 14:19mtaalNew Issue
2017-02-20 14:19mtaalAssigned To => mtaal
2017-02-20 14:19mtaalTriggers an Emergency Pack => No
2017-02-20 16:50mtaalRelationship addedduplicate of 0035310
2017-02-20 16:50mtaalStatusnew => closed
2017-02-20 16:50mtaalResolutionopen => duplicate
2017-02-21 15:17mtaalNote Added: 0094516
2017-02-21 15:17mtaalStatusclosed => new
2017-02-21 15:17mtaalResolutionduplicate => open
2017-02-21 15:31mtaalStatusnew => scheduled
2017-02-21 15:31mtaalReview Assigned To => AugustoMauch
2017-02-21 15:31mtaalNote Added: 0094519
2017-02-21 15:31mtaalStatusscheduled => resolved
2017-02-21 15:31mtaalResolutionopen => fixed
2017-02-21 15:31mtaalRelationship deleted0035310
2017-02-27 10:02AugustoMauchStatusresolved => new
2017-02-27 10:02AugustoMauchResolutionfixed => open
2017-03-29 11:09AugustoMauchAssigned Tomtaal => AugustoMauch
2017-03-29 13:04AugustoMauchNote Added: 0095639
2017-03-29 13:07AugustoMauchNote Added: 0095640
2017-03-29 13:10AugustoMauchStatusnew => closed
2017-03-29 13:10AugustoMauchResolutionopen => unable to reproduce

Notes
(0094516)
mtaal   
2017-02-21 15:17   
wrong issue was set to resolved
(0094519)
mtaal   
2017-02-21 15:31   
Commit was done to wrong issue:

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 2e9e4be93d03edfb590879fbbb5236bcdd98db35
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon Feb 20 14:28:43 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/2e9e4be93d03edfb590879fbbb5236bcdd98db35 [^]

Fixes issue 35310: SQL Message not shown in errors in outgoing batch window
Add System.out as it prints to console in ant task

---
M src/org/openbravo/replication/symmetricds/validation/ExportedTableValidator.java
---
(0095639)
AugustoMauch   
2017-03-29 13:04   
The validation task already shows the full query:

[SynchronizationStoreDataValidationTask] 15096 [main] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: syntax error at or near "int"
[SynchronizationStoreDataValidationTask] Position: 681
[SynchronizationStoreDataValidationTask] Error when executing query: SELECT distinct(leftPart.EM_OBRETCO_Productlist_ID) FROM AD_Org AS leftPart LEFT JOIN OBRETCO_ProductList AS rightPart ON leftPart.EM_OBRETCO_Productlist_ID = rightPart.OBRETCO_ProductList_id AND (rightPart.OBRETCO_ProductList_id in (select EM_OBRETCO_Productlist_ID from ad_org where ad_org_id in ('0','687AD71263F94A31B85A3CC9942FF7ED','14B1927026BE471E9B85FE699BCA61C2','67839EEFA49E44AC969BD60093FCC899','D270A5AC50874F8BA67A88EE977F8E3B','BF129721D9FB4EB0819509934153E972'))) WHERE rightPart.OBRETCO_ProductList_id is null AND leftPart.EM_OBRETCO_Productlist_ID is not null AND leftPart.ad_client_id in ('0','39363B0921BB4293B48383844325E84C') AND (leftPart.ad_org_id int ('0','687AD71263F94A31B85A3CC9942FF7ED','14B1927026BE471E9B85FE699BCA61C2','67839EEFA49E44AC969BD60093FCC899','D270A5AC50874F8BA67A88EE977F8E3B','BF129721D9FB4EB0819509934153E972'))
[SynchronizationStoreDataValidationTask] 15134 [main] ERROR org.openbravo.base.exception.OBException - could not execute query using scroll
[SynchronizationStoreDataValidationTask] org.hibernate.exception.SQLGrammarException: could not execute query using scroll
[SynchronizationStoreDataValidationTask] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
[SynchronizationStoreDataValidationTask] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
[SynchronizationStoreDataValidationTask] at org.hibernate.loader.Loader.scroll(Loader.java:2641)
[SynchronizationStoreDataValidationTask] at org.hibernate.loader.custom.CustomLoader.scroll(CustomLoader.java:322)
[SynchronizationStoreDataValidationTask] at org.hibernate.impl.SessionImpl.scrollCustomQuery(SessionImpl.java:1818)
[SynchronizationStoreDataValidationTask] at org.hibernate.impl.AbstractSessionImpl.scroll(AbstractSessionImpl.java:170)
[SynchronizationStoreDataValidationTask] at org.hibernate.impl.SQLQueryImpl.scroll(SQLQueryImpl.java:183)
[SynchronizationStoreDataValidationTask] at org.openbravo.replication.symmetricds.validation.ExportedTableValidator.getMissingForeignKeys(ExportedTableValidator.java:120)
(0095640)
AugustoMauch   
2017-03-29 13:07   
And also on the export store data task:

[exportstoredata] 14281 ERROR - SQL command to read rows from table failed: SELECT * FROM AD_ORG_WAREHOUSE WHERE ((ad_org_id int ('0','687AD71263F94A31B85A3CC9942FF7ED','14B1927026BE471E9B85FE699BCA61C2','67839EEFA49E44AC969BD60093FCC899','D270A5AC50874F8BA67A88EE977F8E3B','BF129721D9FB4EB0819509934153E972'))) AND ad_client_id in ('39363B0921BB4293B48383844325E84C')
[exportstoredata] org.postgresql.util.PSQLException: ERROR: syntax error at or near "int"
[exportstoredata] Position: 53
[exportstoredata] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
[exportstoredata] at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)