[
https://issues.apache.org/jira/browse/AMBARI-17260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15532158#comment-15532158
]
Hudson commented on AMBARI-17260:
---------------------------------
SUCCESS: Integrated in Jenkins build Ambari-branch-2.5 #91 (See
[https://builds.apache.org/job/Ambari-branch-2.5/91/])
AMBARI-17260. Remove CascadeType in ServiceComponentHistoryEntity for
(smohanty:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=78c95db2e3c7201ceeaedc6a5e8ccea8e45ae3b1])
* (edit)
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentHistoryEntity.java
> 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)