Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024514Openbravo ERP00. Application dictionarypublic2013-08-08 12:462013-08-16 20:32
gorkaion 
alostale 
immediatecriticalalways
closedfixed 
20Gentoo
pi 
3.0MP273.0MP27 
shankarb
Core
Production - Confirmed Stable
2013-05-13
https://code.openbravo.com/erp/devel/pi/rev/885e989c6784 [^]
No
0024514: Delete Client fails when the AD has Datasource based tables
The Delete client process fails when there is a table defined in the AD dictionary that it is Datasource based.

In Oracle the process finishes OK but leaves an exception in the logs. In postgresql the DeleteClient test throws an error in Jenkins [1]

7060408 [http-8080-10] ERROR org.openbravo.service.system.SystemService - exception when deleting the client:
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1010)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    at org.openbravo.service.system.SystemService.deleteClient(SystemService.java:334)


[1] http://builds.openbravo.com/view/try/job/try-full-pgsql/1790/console [^]
1 Create a table in the AD that it is Datasource based.
2 Create a column in this table with:
  -DB Column Name: AD_Client_ID
  -Name: Client
  -Reference: TableDir
3 Restart Tomcat
4 Create a new client.
5 Delete created client.

See logs
The exception is thrown in line 334 of SystemService. In line 323 starts a loop for all entities. In that loop views are ignored but not Datasource based entities. If clause should be modified to include (!entity.isDataSourceBased()).

I haven't checked if there are more loops in the process that loops through all the entities.
No tags attached.
related to defect 0024505 closed AugustoMauch testADataAccessLevel fails with datasource based tables 
Issue History
2013-08-08 12:46gorkaionNew Issue
2013-08-08 12:46gorkaionAssigned To => alostale
2013-08-08 12:46gorkaionModules => Core
2013-08-08 12:46gorkaionTriggers an Emergency Pack => No
2013-08-08 12:52gorkaionRegression level => Production - Confirmed Stable
2013-08-08 12:52gorkaionRegression date => 2013-05-13
2013-08-08 12:52gorkaionRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/885e989c6784 [^]
2013-08-08 14:41alostaleRelationship addedrelated to 0024505
2013-08-08 14:43alostaleReview Assigned To => shankarb
2013-08-08 14:43alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=4948#r4948
2013-08-08 14:45hgbotCheckin
2013-08-08 14:45hgbotNote Added: 0060545
2013-08-08 14:45hgbotStatusnew => resolved
2013-08-08 14:45hgbotResolutionopen => fixed
2013-08-08 14:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d1cfd2567d699ce7ed10198af48f0dd4b137a23d [^]
2013-08-12 06:18shankarbNote Added: 0060558
2013-08-12 06:18shankarbStatusresolved => closed
2013-08-12 06:18shankarbFixed in Version => 3.0MP27
2013-08-16 20:32hudsonbotCheckin
2013-08-16 20:32hudsonbotNote Added: 0060638

Notes
(0060545)
hgbot   
2013-08-08 14:45   
Repository: erp/devel/pi
Changeset: d1cfd2567d699ce7ed10198af48f0dd4b137a23d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Aug 08 14:44:30 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d1cfd2567d699ce7ed10198af48f0dd4b137a23d [^]

fixed bug 24514: Delete Client fails when the AD has Datasource based tables

  Do not include these tabase in delete sql statements

---
M src/org/openbravo/service/system/SystemService.java
---
(0060558)
shankarb   
2013-08-12 06:18   
Code reviewed and verified in pi changeset 38dc65517c76
(0060638)
hudsonbot   
2013-08-16 20:32   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/59a1180e7f4f [^]

Maturity status: Test