Bug 796169 - Deleting a repository with name having space displays exception
Deleting a repository with name having space displays exception
Status: NEW
Product: RHQ Project
Classification: Other
Component: Content (Show other bugs)
Unspecified Unspecified
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-02-22 07:28 EST by Sunil Kondkar
Modified: 2012-02-22 10:30 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
StackTrace (21.96 KB, text/plain)
2012-02-22 07:30 EST, Sunil Kondkar
no flags Details

  None (edit)
Description Sunil Kondkar 2012-02-22 07:28:58 EST
Description of problem:

Deleting a repository with name having space displays exception.

It displays below in UI:

Failed to delete repositories. Cause: javax.ejb.EJBTransactionRolledbackException:org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update -> org.hibernate.exception.ConstraintViolationException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch entry 0 delete from RHQ_REPO where ID='10075' was aborted. Call getNextException to see the cause.[SQLException=Batch entry 0 delete from RHQ_REPO where ID='10075' was aborted. Call getNextException to see the cause. -> ERROR: update or delete on table "rhq_repo" violates foreign key constraint "rhq_repo_repo_relation_map_repo_id_fkey" on table "rhq_repo_repo_relation_map" Detail: Key (id)=(10075) is still referenced from table "rhq_repo_repo_relation_map".(error-code=0,sql-state=23503)]

The stack trace in server log is attached.

Version-Release number of selected component (if applicable):

Build Version: JON 3.0.1.GA RC5 (Build Number: dd8a001:fbca611)
Browser: Firefox 3.6.3
Database : PostgreSQL 8.3.8

How reproducible:


Steps to Reproduce:

1.Create directory structure at platform as below:

mkdir /sunil2
cd /sunil2
mkdir testfolder
cd testfolder
mkdir "repo sunil"
Place a WAR file in folder "repo sunil"

2. Login to UI
3. Navigate to Administration->Content->Content Sources
4. Click on 'Create New' button.
5. Click on 'Local Disk Storage Content Source'.
6. Enter below details:

Name: sunil2
Download Mode: Never
Root Directory: /sunil2
Package Type Name: JBossAS5 - Web Application (WAR) - WAR File
Architecture Name: noarch
Resource Type: JBossAS5 - Web Application (WAR)
Repo Source Enabled : yes

7. After creating the content source, it displays  repositories with name 'testfolder' and 'repo sunil' in Candidate Repositories section.
8. Import 'repo sunil' repository. It displays  repository with name 'repo sunil' in Repositories section.
9. Click on the repository with name 'repo sunil'.
10.Click on the 'Syncronize' button in the UI for repository.
11.It displays the WAR file in 'Packages' section of the repository.

12. Navigate to Administration->Content->Repositories
13. Select the repository with name 'test folder'.
14. Click on 'Delete Selected' button.
Actual results:

Repository is not deleted and it displays exception in UI and server log.

Expected results:

It should delete the repository.

Additional info:
Comment 1 Sunil Kondkar 2012-02-22 07:30:08 EST
Created attachment 564937 [details]
Comment 3 Mike Foley 2012-02-22 10:30:30 EST
triage 2/12/2012 ccrouch, stefan_n, mfoley

Note You need to log in before you can comment on or make changes to this bug.