[jira] [Resolved] (AMBARI-17260) Remove CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity

2016-07-11 Thread Ajit Kumar (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-17260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ajit Kumar resolved AMBARI-17260.
-
   Resolution: Duplicate
Fix Version/s: (was: 2.5.0)
   2.4.0

> Remove CascadeType in ServiceComponentHistoryEntity for 
> ServiceComponentDesiredStateEntity
> --
>
> Key: AMBARI-17260
> URL: https://issues.apache.org/jira/browse/AMBARI-17260
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.4.0
>Reporter: Ajit Kumar
>Assignee: Ajit Kumar
> Fix For: 2.4.0
>
>
> Service deletion throws '500: Server Error' due to foreign key constraint 
> violation :
> {code}
> Exception [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ambaricustom`.`servicecomponent_history`, CONSTRAINT 
> `FK_sc_history_component_id` FOREIGN KEY (`component_id`) REFERENCES 
> `servicecomponentdesiredstate` (`id`))
> Error Code: 1451
> Call: DELETE FROM servicecomponentdesiredstate WHERE (id = ?)
>   bind => [1 parameter bound]
>   at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
> {code}
> Removing CascadeType in ServiceComponentHistoryEntity for 
> ServiceComponentDesiredStateEntity should fix this.
> Repro steps:
> 1. Deploy HDP-2.4 cluster with Ambari 2.4.0.0 
> 2. Perform Express Upgrade to HDP 2.5
> 3. Try to delete Hive service (after stopping it)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (AMBARI-17260) Remove CascadeType in ServiceComponentHistoryEntity for ServiceComponentDesiredStateEntity

2016-06-15 Thread Ajit Kumar (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMBARI-17260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ajit Kumar resolved AMBARI-17260.
-
Resolution: Fixed

Pushed patch to trunk and branch-2.4

> Remove CascadeType in ServiceComponentHistoryEntity for 
> ServiceComponentDesiredStateEntity
> --
>
> Key: AMBARI-17260
> URL: https://issues.apache.org/jira/browse/AMBARI-17260
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.4.0
>Reporter: Ajit Kumar
>Assignee: Ajit Kumar
> Fix For: 2.4.0
>
>
> Service deletion throws '500: Server Error' due to foreign key constraint 
> violation :
> {code}
> Exception [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ambaricustom`.`servicecomponent_history`, CONSTRAINT 
> `FK_sc_history_component_id` FOREIGN KEY (`component_id`) REFERENCES 
> `servicecomponentdesiredstate` (`id`))
> Error Code: 1451
> Call: DELETE FROM servicecomponentdesiredstate WHERE (id = ?)
>   bind => [1 parameter bound]
>   at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
> {code}
> Removing CascadeType in ServiceComponentHistoryEntity for 
> ServiceComponentDesiredStateEntity should fix this.
> Repro steps:
> 1. Deploy HDP-2.4 cluster with Ambari 2.4.0.0 
> 2. Perform Express Upgrade to HDP 2.5
> 3. Try to delete Hive service (after stopping it)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)