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: Always 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:
Created attachment 564937 [details] StackTrace
triage 2/12/2012 ccrouch, stefan_n, mfoley