Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028190
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2014-11-17 14:042015-05-11 11:09
ReporterOrekariaView Statuspublic 
Assigned ToOrekaria 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revisione185fb4ea79d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028190: Stabilization: 'ant install.source' incorrectly reports that the database already exists when it should report that is opened

DescriptionStabilization: Install.source incorrectly report that the database already exists when it should report that is opened and the server should be stopped
Steps To ReproduceIn a working Openbravo instance:

1) Create a database connection to the database of an Openbravo instance
Execute at least one of these options:
- open pgAdmin (or other db tool that keeps db connection alive)
  open the database of instance
- start tomcat with the Openbravo instance

2) Install.source
in the openbravo directory of the selected instance
execute 'ant install.source'

Verify that the following error message is shown (INCORRECT):
build-create.xml:203: org.postgresql.util.PSQLException: ERROR: database "obtip" already exists

3) close database connections
stop tomcat or/and close pgAdmin session to the database
execute install.source again
Verify that the build is correctly executed


The problem:
The message is correctly reporting that the database exists BUT the real problem is that there are open connections to the database
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0029396RR15Q3 closedRetail Retail Modules Stabilization: RR15Q3 related 

-  Notes
(0076561)
hgbot (developer)
2015-04-15 17:46

Repository: erp/devel/pi
Changeset: e185fb4ea79d609124d683cb2da0308167be5b10
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Wed Apr 15 17:31:04 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e185fb4ea79d609124d683cb2da0308167be5b10 [^]

Fixes issue 28190: The database will try to be dropped before being created

The problem was that the exception was raised because the database tried to be created.
Adding a 'DROP IF EXISTS' clause, the engine will properly report that the database is being accesed and cannot be dropped
We can drop the table because as of now, if the database already exists, the database is effectively dropped

---
M src-db/database/build-create.xml
---
(0076599)
Orekaria (administrator)
2015-04-17 11:10

Message shown after patch:

/data/repos/tip/openbravo/src-db/database/build-create.xml:203: org.postgresql.util.PSQLException: ERROR: database "obtip" is being accessed by other users
  Detail: There is 1 other session using the database.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
(0076634)
hgbot (developer)
2015-04-20 14:24
edited on: 2015-04-20 14:25

Repository: erp/devel/pi
Changeset: f5111981f65642f5beaf557d2f714a50d4aefd3b
Author: Rafa Alonso <rafael.alonso <at> openbravo.com>
Date: Mon Apr 20 14:19:07 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f5111981f65642f5beaf557d2f714a50d4aefd3b [^]

Related issue 28190: Failing to drop the database will cause the build to fail (II)

After Stefan feedback:
- the fix now makes use of the existing DROP in the "clean.database.POSTGRE" task. The change is that the build will but the build fail if the drop fails.

The "clean.database.POSTGRE" task is being accessed by the <target name="create.database"> task.

Note that the "clean.database.ORACLE" task has not been addressed in this changeset.

---
M src-db/database/build-create.xml
---

(0076871)
Orekaria (administrator)
2015-04-29 12:27

Oracle message when tomcat is running and the install.source task is called:

clean.database.ORACLE:
      [sql] Executing commands
      [sql] Failed to execute: DROP USER TAD CASCADE
      [sql] java.sql.SQLSyntaxErrorException: ORA-01940: cannot drop a user that is currently connected
      [sql] 0 of 1 SQL statements executed successfully

prepare.database:

ORACLE.structure:
      [sql] Executing commands
      [sql] Failed to execute: DECLARE v_count NUMBER; BEGIN SELECT COUNT(*) INTO v_count FROM DBA_USERS WHERE USERNAME = 'TAD'; IF (v_count > 0) THEN RAISE_APPLICATION_ERROR(-20100, 'TAD ALREADY EXISTS. SELECT ANOTHER USER OR DROP IT FIRST'); END IF; END;

BUILD FAILED
(0077129)
hudsonbot (developer)
2015-05-07 22:16

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/a1817f84bd8b [^]
Maturity status: Test
(0077137)
hudsonbot (developer)
2015-05-07 22:16

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/a1817f84bd8b [^]
Maturity status: Test
(0077270)
alostale (manager)
2015-05-11 11:09

code reviewed + tested

- Issue History
Date Modified Username Field Change
2014-11-17 14:04 Orekaria New Issue
2014-11-17 14:04 Orekaria Assigned To => dmiguelez
2014-11-17 14:04 Orekaria Modules => Core
2014-11-17 14:04 Orekaria Triggers an Emergency Pack => No
2014-11-17 14:05 Orekaria Summary Stabilization: Install.source incorrectly report that the database already exists when it should report that is opened => Stabilization: 'ant install.source' incorrectly reports that the database already exists when it should report that is opened
2015-04-15 17:46 hgbot Checkin
2015-04-15 17:46 hgbot Note Added: 0076561
2015-04-15 17:46 hgbot Status new => resolved
2015-04-15 17:46 hgbot Resolution open => fixed
2015-04-15 17:46 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e185fb4ea79d609124d683cb2da0308167be5b10 [^]
2015-04-15 17:47 Orekaria Relationship added blocks 0029396
2015-04-17 11:10 Orekaria Note Added: 0076599
2015-04-17 12:31 Orekaria Steps to Reproduce Updated View Revisions
2015-04-17 12:31 Orekaria Steps to Reproduce Updated View Revisions
2015-04-20 14:21 Orekaria Status resolved => new
2015-04-20 14:21 Orekaria Resolution fixed => open
2015-04-20 14:24 hgbot Checkin
2015-04-20 14:24 hgbot Note Added: 0076634
2015-04-20 14:24 Orekaria Note Edited: 0076634 View Revisions
2015-04-20 14:25 Orekaria Note Edited: 0076634 View Revisions
2015-04-21 15:54 Orekaria Assigned To dmiguelez => platform
2015-04-21 15:55 Orekaria Category 01. General setup => A. Platform
2015-04-21 15:55 Orekaria Assigned To platform => Orekaria
2015-04-21 15:56 Orekaria Issue Monitored: alostale
2015-04-21 15:56 Orekaria Review Assigned To => alostale
2015-04-29 12:27 Orekaria Note Added: 0076871
2015-04-29 12:27 Orekaria Status new => scheduled
2015-04-29 12:27 Orekaria Status scheduled => resolved
2015-04-29 12:27 Orekaria Fixed in Version => 3.0PR15Q3
2015-04-29 12:27 Orekaria Resolution open => fixed
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077129
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077137
2015-05-11 11:09 alostale Note Added: 0077270
2015-05-11 11:09 alostale Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker